How to use the triangle solver
Type any three of the six measurements: sides a, b and c, and angles A, B and C. At least one of them must be a side. Leave the other three boxes empty. Each side is named after the angle opposite it, so side a faces angle A. The solver recognises which case you have (SSS, SAS, ASA, AAS or SSA) and picks the right method. It then shows each step, along with a drawing to scale.
Angles can be in degrees or radians. In radians you can type values such as pi/3, and switching the unit converts any angles already entered. Sides accept decimals and fractions. When all three sides are given, the cosines and area are also shown exactly, as fractions and simplified square roots. Tick the boxes under the form to add heights, medians, the incircle or the circumcircle to the drawing.
Which three measurements fix a triangle?
- SSS: three sides. There is one triangle, provided each side is shorter than the other two put together. That rule is the triangle inequality.
- SAS: two sides and the angle between them. There is always exactly one triangle.
- ASA: two angles and the side between them, or AAS: two angles and another side. There is one triangle if the two angles add to less than 180°.
- SSA: two sides and an angle that is not between them. This can give no triangle, one, or two. It is called the ambiguous case.
- AAA: three angles fix the shape but not the size. Similar triangles of every size share them, so you need at least one length.
The three rules behind every solution
The angle sum gives the third angle whenever two are known. The law of sines links each side to the angle opposite it. Their common ratio equals the diameter of the circle through all three corners, so it is the tool for ASA, AAS and SSA. The law of cosines is Pythagoras’ theorem with a correction term for angles other than 90°. It finds the third side in SAS, and every angle in SSS.
When an angle could be obtuse, the solver finds it with the law of cosines rather than the law of sines. An angle and its supplement have the same sine (sin 40° = sin 140°), so the sine rule alone cannot tell them apart. The cosine rule always can.
The ambiguous case (SSA)
Suppose a = 7, b = 11 and A = 32°. The law of sines gives sin B = 11 × sin 32° ÷ 7 ≈ 0.833. Two angles have that sine, B ≈ 56.38° and B ≈ 123.62°, and both leave room for a positive third angle. So two different triangles fit. In the first, C ≈ 91.62° and c ≈ 13.20. In the second, C ≈ 24.38° and c ≈ 5.45. Picture side a as a gate swinging from corner C. It can reach the baseline at two points.
When the known angle A is acute, there is a quick test. Compare a with h = b sin A, the shortest distance from C to the opposite line:
- a < h: no triangle, because the side is too short to reach.
- a = h: one right-angled triangle.
- h < a < b: two triangles.
- a ≥ b: one triangle.
If A is 90° or more, there is one triangle when a > b and none otherwise. The solver applies this automatically. When two triangles fit, it shows both, and you can switch between them.
Area, three ways
- Heron’s formula (three sides): area = √(s(s − a)(s − b)(s − c)), where s is half the perimeter. For sides 9, 10 and 17, s = 18 and the area is √(18 × 9 × 8 × 1) = 36. That makes it a Heronian triangle, with whole-number sides and a whole-number area.
- Two sides and the angle between them: area = ½ab sin C.
- Base and height: area = ½ × base × height. Turned around, this gives each height as 2 × area ÷ base.
The solver uses Heron’s formula and checks it against ½ab sin C, so you can see both agree. If you only need the area, the triangle area calculator has more input options. If you have corner coordinates, the coordinate geometry calculator handles triangles from points.
Heights, medians, bisectors and circles
- Height (altitude): the perpendicular from a corner to the opposite side, or to its extension when the triangle is obtuse.
- Median: joins a corner to the midpoint of the opposite side. The median from A is ½√(2b² + 2c² − a²). The three medians cross at the centroid, the triangle’s balance point.
- Angle bisector: splits an angle in half. The bisector from A has length 2bc cos(A/2) ÷ (b + c).
- Circumradius R = a ÷ (2 sin A) = abc ÷ (4 × area): the radius of the circle through all three corners.
- Inradius r = area ÷ s: the radius of the largest circle that fits inside. The three exradii, area ÷ (s − a) and so on, belong to the circles touching each side from outside.
Worked examples from real life
Width of a river (ASA). Mark two points A and B 120 m apart along one bank. Sight a tree C on the far bank and measure the angles at A and B: 64° and 71°. The third angle is 45°. The law of sines then gives AC ≈ 160.5 m and BC ≈ 152.5 m. The river’s width is the height from C to the baseline, about 144.2 m. Surveyors call this method triangulation.
Distance back to port (SAS). A boat sails 30 km, turns, and sails 45 km. The angle between the two legs is 155°. The law of cosines gives the straight-line distance back as √(30² + 45² − 2 × 30 × 45 × cos 155°) ≈ 73.3 km.
Roof pitch (SSS). Two 4.2 m rafters meet over a 7.6 m span. The base angles of 25.2° are the roof pitch, and the apex angle is 129.6°. The height from the apex to the span, about 1.79 m, is the roof’s rise.
A plot of land (SSS). A triangular garden with sides 23 m, 31 m and 40 m has an area of about 355.4 m², from Heron’s formula. You only need a tape measure, with no angles to measure. Irregular plots can be split into triangles like this and added up.
Common mistakes
- Mixing up SAS and SSA. Check whether the known angle sits between the two known sides. A wrong label gives a different triangle.
- Mismatched letters. Side a must face angle A. Label a sketch before entering values.
- Calculator in the wrong angle mode. A degrees answer computed in radian mode is nonsense. Here you choose the unit explicitly.
- Trusting the sine rule for an obtuse angle. It returns the acute angle with the same sine. Use the cosine rule, or check that the angles add to 180°.
- Rounding too early. Keep full precision until the end, especially in long chains of calculation.