Triangle Calculator
The triangle calculator lets you instantly compute the area, perimeter and angles of any triangle from the data you provide. It supports three modes: three sides (SSS), two sides and the included angle (SAS), and one side with two angles (AAS). In SSS mode, the calculator uses Heron's formula: s = (a+b+c)/2, area = √(s·(s−a)·(s−b)·(s−c)). Angles are derived from the law of cosines: cos A = (b²+c²−a²)/(2bc). The calculator validates the triangle inequality — if the sides cannot form a valid triangle the result is zero. This tool is perfect for school students, university mathematics courses, construction professionals and anyone needing a quick geometric calculation.
Na tej stronie
How the triangle calculator works
The calculator supports three modes: 1. SSS (three sides): enter a, b, c. The triangle inequality is verified, area is computed by Heron's formula, and angles by the law of cosines. 2. SAS (two sides + included angle): enter sides a and b, and angle c (degrees) between them. Area = 0.5·a·b·sin(c). The third side is found via the law of cosines. 3. AAS (one side + two angles): enter side a and angles b, c (degrees). Third angle = 180°−b−c. Remaining sides by the law of sines.
Example: the 3-4-5 right triangle
Triangle with sides 3, 4, 5: s = (3+4+5)/2 = 6, area = √(6·3·2·1) = √36 = 6 sq units. Perimeter = 3+4+5 = 12 units. Angle opposite side 3: arccos((16+25−9)/(2·4·5)) = arccos(0.8) ≈ 36.87°. This is a right triangle (3²+4²=5²), so the angle opposite side 5 is exactly 90°.
Frequently asked questions
What is Heron's formula?
Heron's formula calculates a triangle's area from its three side lengths: compute the semi-perimeter s = (a+b+c)/2, then area = √(s(s−a)(s−b)(s−c)). It requires no angles — only the three sides. Example: sides 3, 4, 5 → s=6, area = √(6·3·2·1) = 6.
What is the Pythagorean theorem?
In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². The classic example is the 3-4-5 triple: 9+16=25. This theorem is used to find a missing side in any right triangle.
What are the types of triangles?
By angles: right (one 90° angle), acute (all angles <90°), obtuse (one angle >90°). By sides: equilateral (3 equal sides), isosceles (2 equal sides), scalene (all sides different). Any valid triangle has angles summing to exactly 180°.
How do I find angles from three known sides?
Use the law of cosines: cos A = (b²+c²−a²)/(2bc), so A = arccos(…). Then B = arccos((a²+c²−b²)/(2ac)). Finally C = 180°−A−B. This works for any triangle as long as the three sides satisfy the triangle inequality.
When do three lengths form a valid triangle?
Three lengths a, b, c form a triangle if and only if the triangle inequality holds: the sum of any two sides must exceed the third: a+b>c, a+c>b, and b+c>a. If any condition fails the triangle does not exist.
How do I find the area from two sides and an angle?
If you know sides a and b and the included angle C, the area = (1/2)·a·b·sin(C). Example: a=3, b=4, C=90° → area = 0.5·3·4·1 = 6. This is the SAS formula and works for any angle between the two known sides.
What is the law of sines?
The law of sines states: a/sin(A) = b/sin(B) = c/sin(C) = 2R, where R is the circumradius. It is used when one side and two angles are known (AAS or ASA). Example: if a=5, A=60°, B=60° then b = 5·sin(60°)/sin(60°) = 5.
How do I calculate a triangle's height?
Height h to base a = 2·area / a. For the 3-4-5 triangle with area 6: height to side 5 is h = 2·6/5 = 2.4. Alternatively use trigonometry: h = b·sin(C) where C is the angle at the vertex opposite base a.
What is the difference between perimeter and area?
The perimeter is the total length around the triangle: P = a+b+c (in metres, cm etc.). The area is the size of the enclosed surface, measured in square units (m², cm²). Heron's formula computes area from three sides without needing the height.
How can I tell if a triangle is a right triangle?
Check whether the Pythagorean theorem holds for the longest side c: a²+b²=c². If yes, it is a right triangle and the angle opposite c is exactly 90°. In practice, check if |a²+b²−c²| < a very small epsilon to account for rounding.
Results are for educational and informational purposes. The calculator applies Heron's formula, the law of cosines and the law of sines. Verify calculations independently for engineering or construction applications.