Triangle Solver
Find every side, angle and the area from three measurements — and both triangles when there are two.
-
Angle A, opposite side a 36.8699°
A = arccos((b² + c² − a²) ÷ (2 × b × c))
A = arccos((4² + 5² − 3²) ÷ (2 × 4 × 5))
-
Angle B, opposite side b 53.1301°
B = arccos((a² + c² − b²) ÷ (2 × a × c))
B = arccos((3² + 5² − 4²) ÷ (2 × 3 × 5))
-
Angle C, opposite side c 90°
C = 180° − A° − B°
C = 180° − 36.8699° − 53.1301°
-
Area 6
S = ½ × a × b × sin(C°)
S = ½ × 3 × 4 × sin(90°)
-
Perimeter 12
P = a + b + c
P = 3 + 4 + 5
Three measurements fix a triangle — usually. Give it three sides, or two sides and an angle, or two angles and a side, and every remaining side, angle and the area follow.
The answer is drawn as well as listed, to scale with itself: the same shape at any size gives the same picture, and a triangle that is genuinely a sliver is drawn as one rather than tidied into something comfortable. Where the measurements fit two triangles, both are drawn side by side.
How it works
Sides are a, b and c; the angle opposite each is A, B and C. Three sides are solved by the law of cosines, and everything with an angle in it by the law of sines, which says that every side divided by the sine of its opposite angle is the same number.
One case is different, and it is the reason this page exists. Two sides and an angle that is not between them — SSA — can describe two entirely valid triangles. Picture side a swinging from the end of side b: if it is shorter than the height it never reaches the base and there is no triangle, if it is longer than b there is exactly one, and between those it crosses the base twice. Both crossings are real answers, and both are shown.
The area is half the product of two sides and the sine of the angle between them, not Heron's formula. Heron is the one everybody learns, and on a very thin triangle it subtracts two nearly equal numbers and loses most of its accuracy.
Examples
| Case | Input | Result |
|---|---|---|
| Three sides, a right angle falls out | SSS, 3 / 4 / 5 | A 36.87°, B 53.13°, C 90°, area 6 |
| The ambiguous case, with two answers | SSA, a = 7, b = 10, A = 40° | B = 66.67° or B = 113.33° — two triangles |
| Measurements that meet nowhere | SSS, 1 / 2 / 10 | refused — two sides are shorter than the third |
Frequently asked questions
Why do I sometimes get two triangles?
Because two sides and a non-included angle do not always pin one down. Both answers satisfy every measurement you gave; nothing in the numbers chooses between them. Which one you meant depends on something you know and the measurements do not — usually whether the unknown angle is acute or obtuse.
In what order are the three fields read?
In the order the chosen option names them. SAS is side, side, then the angle between them; ASA is angle, side, angle; AAS is the two angles then the side opposite the first. The hint under the selector says so on the page itself.
Why was my triangle refused?
Either two sides together are no longer than the third, in which case they never meet, or the angles you gave already add to 180° or more, leaving nothing for the third. Both are geometry saying no, not the page.
Degrees or radians?
Degrees, in and out. Radians are the right unit for calculus and the wrong one for typing into a box.
Good to know
- Lengths have no unit here: give three centimetres or three miles and the angles are the same either way. Only the area and the perimeter carry whatever unit you brought.
- The figure has no unit either, and no fixed size. It shows the shape and the proportions, never the scale — which is the only thing three bare numbers can honestly be drawn as.