Triangle Length Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Enter two sides of a triangle and the angle between them to get the length of the third side.
Result
Third side c
Angle A, opposite side a (degrees)
- Angle B, opposite side b (degrees)
- Area (½ab sin C, square units)
- Perimeter
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Side a: enter 0 or more.
- Side b (same unit): enter 0 or more.
- Angle C between a and b (0 to 180), in °: enter a number from 0 to 180.
- Read the result: Third side c; the panel also shows Angle A, opposite side a (degrees), Angle B, opposite side b (degrees), Area (½ab sin C, square units) and Perimeter.
How this calculator works
The law of cosines gives the side opposite angle C: c² = a² + b² − 2ab cos C. With C = 90° it reduces to the Pythagorean theorem.
The other angles follow from the same law, A = arccos((b² + c² − a²) ÷ 2bc), and the angle sum A + B + C = 180°. The area is ½ab sin C.
The formula
| Symbol | Meaning | Unit |
|---|---|---|
| Side a | ||
| Side b | same unit | |
| Angle C between a and b (0 to 180) | ° | |
| Third side c | ||
rad(x) | the angle x, converted from degrees to radians. |
Worked example
| Side a | 5 |
|---|---|
| Side b (same unit) | 7 |
| Angle C between a and b (0 to 180) | 60 ° |
| Angle A, opposite side a (degrees) | 43.8979 |
|---|---|
| Angle B, opposite side b (degrees) | 76.1021 |
| Area (½ab sin C, square units) | 15.1554 |
| Perimeter | 18.245 |
Third side c 6.245
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
How do I find the third side of a triangle?
If you know two sides and the angle between them, use c = √(a² + b² − 2ab cos C). For 5, 7 and 60° that is √39 ≈ 6.245.
What if the triangle has a right angle?
Set C = 90°: cos 90° = 0 and the formula becomes c = √(a² + b²).
What if I know two sides and an angle that is not between them?
That is the SSA case, solved with the law of sines; it can have zero, one or two triangles.