Triangle Calculator
Enter any three sides or angles — including at least one side — to solve the whole triangle. You get every side and angle, the area, perimeter, heights, medians, inradius and circumradius, and a drawing to scale.
Include at least one side. Side a is opposite angle A, b opposite B and c opposite C. Fields also accept expressions such as pi/3 or sqrt(2).
Solved from three sides (SSS).
How to use the Triangle Calculator
- Label your triangle so each side has the same letter as the angle opposite it: side a faces angle A.
- Type exactly three values, at least one of them a side. Leave the other three boxes empty.
- Read the solution — it updates as you type. If two triangles fit, switch between them above the drawing.
Triangle Calculator formulas
Law of cosines: a² = b² + c² − 2bc·cos A
Law of sines: a / sin A = b / sin B = c / sin C
Angle sum: A + B + C = 180°
Area = ½·ab·sin C
Height to a = 2 × area ÷ a
Median to a = ½·√(2b² + 2c² − a²)
Inradius = area ÷ semiperimeter
Circumradius = a ÷ (2 sin A)
Three sides (SSS) and two sides with the angle between them (SAS) are solved with the law of cosines. Two angles and a side (ASA or AAS) use the angle sum and the law of sines. Two sides and an angle not between them (SSA) use the law of sines and check for a second solution.
Triangle Calculator worked examples
Three sides: 5, 5 and 8
- Angle C: cos C = (25 + 25 − 64) ÷ 50 = −0.28, so C ≈ 106.26°
- A = B = (180 − 106.26) ÷ 2 ≈ 36.87°
- Area = ½ × 5 × 5 × sin 106.26° = 12
Distance across a lake (SAS)
From one spot, the two ends of a lake are 7 km and 9 km away, 60° apart.
- a² = 7² + 9² − 2 × 7 × 9 × cos 60° = 49 + 81 − 63 = 67
- Width ≈ 8.185 km
Triangle Calculator FAQ
Any 3 values with at least one side — SSS, SAS, ASA, AAS, or SSA.
Shorthand for known values: SSS = 3 sides, SAS = 2 sides + included angle, ASA/AAS = 2 angles + a side, SSA = 2 sides + non-included angle.
Law of sines for ASA/AAS/SSA; law of cosines for SSS/SAS.
Rearranged law of cosines: cos(C) = (a² + b² − c²) ÷ 2ab, then arccos.
Yes — if the longest side ≥ sum of the other two, no triangle exists.
s = (a+b+c) ÷ 2, then area = √(s(s−a)(s−b)(s−c)).