Triangle calculator
Enter three things you know about a triangle, get the rest.
How do I find the angles from three sides?
Use the law of cosines: cos A = (b² + c² − a²) ÷ 2bc. For sides 3, 4 and 5 that gives A = 36.87°, B = 53.13° and C = 90° — a right triangle.
How do I find the area from three sides?
With Heron's formula: s = (a + b + c) ÷ 2, area = √(s(s − a)(s − b)(s − c)). For 3, 4, 5: s = 6, area = √(6 × 3 × 2 × 1) = 6.
What if I know two sides and the angle between them?
The third side comes from the law of cosines, a² = b² + c² − 2bc·cos A, and the area is ½·b·c·sin A. Two sides of 5 with 60° between them make an equilateral triangle with area 10.83.
What if I know two angles and a side?
The third angle is 180° minus the other two, and the law of sines gives the other sides: a ÷ sin A = b ÷ sin B = c ÷ sin C.
Why does it say the sides cannot make a triangle?
Any two sides together must be longer than the third. Sides of 1, 2 and 3 lie flat in a line, and 1, 2 and 4 cannot meet at all.
How do I tell whether a triangle is acute, right or obtuse from its sides?
Compare the square of the longest side with the sum of the squares of the other two. If they are equal, it is a right triangle; if the longest square is bigger, it is obtuse; if smaller, acute. For sides 4, 5 and 8: 4² + 5² = 41 is less than 8² = 64, so the triangle is obtuse, with its largest angle 125.1° opposite the 8.
Why can't I enter two sides and an angle that is not between them?
That case, known as side-side-angle, can have two different solutions, one solution or none, depending on the numbers, so a single answer is not guaranteed. The calculator takes the angle between the two sides (side-angle-side) or two angles and the side between them. With a different arrangement, first find the third angle with 180° minus the other two.
What the calculator does for each input
With three sides it finds each angle from the law of cosines and the area from Heron's formula. With two sides and the angle between them it finds the third side from the law of cosines, then does the rest. With two angles and the side between them, the third angle is 180° minus the other two, and the law of sines gives the other sides. In every case it also reports the perimeter, the three heights (each height is 2 × area ÷ the side it stands on) and whether the triangle is equilateral, isosceles or scalene and acute, right or obtuse. All angles are in degrees.
Worked example: three ways to describe a triangle
Sides 7, 8 and 9: the angles are 48.2°, 58.4° and 73.4° (they add up to 180°), the perimeter is 24 and the area is 26.83. Check with Heron: s = 12, area = √(12 × 5 × 4 × 3) = √720 = 26.83. Two sides of 7 and 9 with a 40° angle between them: the third side is √(7² + 9² − 2 × 7 × 9 × cos 40°) = 5.79, and the area is ½ × 7 × 9 × sin 40° = 20.25. Angles of 50° and 60° with the 10-unit side between them: the third angle is 70°, and the other sides are 8.15 and 9.22, with an area of 35.30.
Which formula for which data
If you know the base and the height straight up to it, the area is ½ × base × height, and no angles are needed. If you know two sides and the angle between them, use ½ b c sin A. If you know all three sides, Heron's formula needs no angles at all. For a right triangle, the legs a and b and hypotenuse c satisfy a² + b² = c², and the area is half the product of the legs. Angles in a triangle always sum to 180°, so one angle can always be found from the other two.
Common mistakes
The most frequent error is a calculator or spreadsheet set to radians when you meant degrees, which gives angles that look wrong. Another is entering an angle that is not the one between the two sides in the side-angle-side mode. A third is using sides that violate the triangle inequality: any two sides must add up to more than the third. Rounding too early compounds through the law of cosines, so keep several decimals until the end. And remember that a height in this table is perpendicular to its side and may fall outside the triangle for an obtuse one.
Sources: OpenStax Precalculus 2e, chapter 8 (law of sines and law of cosines); Heron's formula as in standard geometry texts. Related: right triangle calculator, Pythagorean theorem calculator and area calculator.