How to Solve a Triangle: Sides, Angles and Area
How to find every side, angle, the perimeter and the area of a triangle from three sides, two sides and the angle between them, or two angles and a side.
In this article
Every triangle has six measurements: three sides and three angles. Solving a triangle means finding all six, usually starting from three of them. Which method you use depends on what you know. The three cases covered by the Triangle Calculator on this site are three sides, two sides with the angle between them, and two angles with a side. This guide explains the formulas for each, with numbers you can check. By convention, side a is opposite angle A, side b is opposite angle B and side c is opposite angle C, and the three angles always add up to 180 degrees.
Three sides known
When all three sides are known, use the law of cosines to find the angles. Wikipedia gives it as c² = a² + b² − 2ab cos C, and it can be rearranged for any angle. For angle A, cos A = (b² + c² − a²) ÷ (2bc). Take the triangle with sides 3, 4 and 5. Then cos A = (16 + 25 − 9) ÷ (2 × 4 × 5) = 32 ÷ 40 = 0.8, so A is about 36.87 degrees. In the same way cos B = (9 + 25 − 16) ÷ (2 × 3 × 5) = 0.6, so B is about 53.13 degrees, and C = 180 − 36.87 − 53.13 = 90 degrees. It is a right triangle.
The three sides must be able to meet. Each side has to be shorter than the other two added together, which is called the triangle inequality. Sides of 1, 2 and 5 cannot form a triangle because 1 + 2 is less than 5, and the calculator reports that instead of an answer.
Two sides and the angle between them
When you know two sides and the angle between them, the law of cosines gives the third side first. Suppose a = 7, b = 9 and the angle between them, C, is 40 degrees. Then c² = 49 + 81 − 2 × 7 × 9 × cos 40° = 130 − 126 × 0.7660 = 33.48, so c is about 5.786. With all three sides known, find an angle with the law of cosines again: A is about 51.05 degrees, and B = 180 − 51.05 − 40 = 88.95 degrees.
Two angles and a side
If two angles are known, the third follows at once from C = 180° − A − B. A known side then gives the other two sides through the law of sines: a ÷ sin A = b ÷ sin B = c ÷ sin C. Take A = 40 degrees, B = 65 degrees and a = 10. Then C = 75 degrees, b = 10 × sin 65° ÷ sin 40° = 14.10, and c = 10 × sin 75° ÷ sin 40° = 15.03. The calculator asks for side a opposite angle A, but any triangle with two known angles and one known side can be relabelled to fit.
Perimeter and area
The perimeter is simply a + b + c. For the area there are two useful formulas. When you know two sides and the angle between them, area = ½ × a × b × sin C. For the 7, 9 and 40 degrees example this is 0.5 × 7 × 9 × sin 40° = 20.25 square units. When you know all three sides, Heron's formula avoids angles altogether. Let s be half the perimeter; then area = √( s (s − a)(s − b)(s − c) ). MathWorld records this formula and credits it to Heron of Alexandria. For the 3, 4, 5 triangle, s = 6 and the area is √(6 × 3 × 2 × 1) = √36 = 6. For sides of 5, 7 and 8, s = 10 and the area is √(10 × 5 × 3 × 2) = √300 = 17.32.
Naming the triangle
- Equilateral: all three sides equal, and every angle is 60 degrees
- Isosceles: at least two sides equal, so two angles are equal as well
- Scalene: all sides different
- Right: one angle is exactly 90 degrees, and the sides then satisfy a² + b² = c²
- Acute: all angles are below 90 degrees; obtuse: one angle is above 90 degrees
Why two sides and an angle elsewhere is not covered
If you know two sides and an angle that is not between them, there can be one triangle, two triangles or none. This is often called the ambiguous case, and it needs extra information to settle. The calculator therefore sticks to the three cases that always give exactly one triangle, and lets you see every step of the working with your own numbers.
Sources
Share
Keep reading
Related articles
How a Scientific Calculator Works Out an Expression
How the order of operations, brackets, powers, functions and degrees or radians decide the answer to a typed expression, with examples to check.
Standard Deviation Explained: Sample or Population
What standard deviation measures, how to work it out step by step, why a sample divides by n minus 1, and a worked example you can check.
How Random Numbers Are Made, and How to Pick One Fairly
How a random number generator turns random bits into a fair pick from a range, why a simple remainder can be biased, and when to use unique numbers.