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 this 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.
The 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.
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
Frequently asked questions
Three angles fix a triangle's shape but not its size: a triangle with angles of 30°, 60° and 90° could have a shortest side of 1 cm or 1 km. One length is needed to pin the scale down.
When you know two sides and an angle that is not between them (SSA), the third corner can land in two different places. With a = 6, b = 8 and A = 35°, angle B can be about 49.9° or about 130.1°, giving two valid triangles.
This is called the ambiguous case. The calculator shows both and lets you switch between them. Sometimes only one triangle fits, and sometimes none does.
The inradius is the radius of the largest circle that fits inside the triangle, touching all three sides. The circumradius is the radius of the circle that passes through all three corners.
For any triangle, the circumradius is at least twice the inradius; they are exactly in that ratio only for an equilateral triangle.
The line from a corner to the midpoint of the opposite side. The three medians cross at the centroid, the triangle's balance point, which sits two-thirds of the way along each median from its corner.
Yes — switch the angle unit to Radians. Fields also accept expressions, so you can type pi/6 or 2pi/3 instead of a long decimal. Sides accept expressions too, such as sqrt(2).