Triangle
solver.
Enter any three sides or angles. You get the rest, drawn to scale, with every step.
Every angle is under 90° (the largest is C = 81.79°), so the triangle is acute and its circumcenter lies inside it. No two sides are equal, so it is scalene.
Your triangle, to scale
Drag the brass corner to reshape itSide a = 5 is opposite angle A = 38.21°, side b = 7 is opposite B = 60°, and side c = 8 is opposite C = 81.79°. Corner C is the brass point.
Working
- 1Angle A by the law of cosinescos A = b² + c² − a²2bc = 0.79A = 38.21°
- 2Angle B by the law of cosinescos B = a² + c² − b²2ac = 0.5B = 60°
- 3Angle C from the angle sumC = 180° − A − B = 81.79°
- 4Area by Heron's formulas = 10area = √(s(s − a)(s − b)(s − c)) = 17.32
- 5Check: solve again from a, B and cb = 7, the side you entered
- 6AnswerA = 38.21°, B = 60°, C = 81.79°
Every measurement
| Side | Length | Angle | Altitude | Median |
|---|---|---|---|---|
| a | 5 | 38.21° | 6.93 | 7.09 |
| b | 7 | 60° | 4.95 | 5.68 |
| c | 8 | 81.79° | 4.33 | 4.58 |
Each altitude runs from the opposite corner to the side at a right angle; each median runs from the opposite corner to the side's midpoint. Area = 17.32, perimeter = 20.
What if a changes
| a | A | B | C | Area |
|---|---|---|---|---|
| 3.5Area 12.23 | 25.9° | 60.88° | 93.22° | 12.23 |
| 4Area 14 | 29.99° | 61.03° | 88.98° | 14 |
| 4.5Area 15.7 | 34.09° | 60.69° | 85.22° | 15.7 |
| 5 (yours)Area 17.32 | 38.21° | 60° | 81.79° | 17.32 |
| 5.5Area 18.87 | 42.37° | 59.06° | 78.58° | 18.87 |
| 6Area 20.33 | 46.57° | 57.91° | 75.52° | 20.33 |
| 6.5Area 21.71 | 50.82° | 56.6° | 72.58° | 21.71 |
Steps of 0.5 around your a. 7 of 7 rows make a triangle.
Keyboard shortcuts
- Up and Down in a box change it by one step. Hold Shift for ten steps.
- Tab to the brass corner, then use the arrow keys to move it. Shift moves it further.
- Left and Right switch between deg and rad, decimal places, and the two triangles in the ambiguous case.
Solve a list of triangles
Type or paste rows of a, b, c for the SSS case (three sides). Angles are in degrees.
| # | a | b | c |
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 |
Missing values for each row
| Given | A, B, C | Area | Type |
|---|---|---|---|
| 5, 7, 8Acute scalene | 38.21°, 60°, 81.79° | 17.32 | Acute scalene |
| 3, 4, 5Right scalene | 36.87°, 53.13°, 90° | 6 | Right scalene |
| 6, 6, 6Acute equilateral | 60°, 60°, 60° | 15.59 | Acute equilateral |
| 1, 2, 3 | no triangle | none | None |
How it’s worked out
Three measurements fix a triangle, as long as at least one of them is a side. The labels follow the textbook rule: side a sits opposite angle A, side b opposite angle B and side c opposite angle C. Two laws do all the work.
The law of cosines links three sides with one angle. It finds the third side when you know two sides and the angle between them (SAS), and it finds every angle when you know all three sides (SSS):
Turned around, it gives an angle from three sides:
When C is 90°, cos C is 0 and the last term drops out, leaving Pythagoras. That is why the law of cosines is often called Pythagoras with a correction.
The law of sines links each side with the angle across from it. It finishes the ASA and AAS cases once the third angle is known from A + B + C = 180°, and it starts the SSA case:
R is the circumradius, the radius of the circle through all three corners. The tool takes angles from the law of cosines wherever it can, because an inverse sine cannot tell an acute angle from its obtuse partner. With sides 10 and 3 and a 20° angle between them, the angle across from the long side is A = 151.87°. An inverse sine would return the acute angle with the same sine instead, and every value after it would be wrong.
Once all three sides are known, the area comes from Heron's formula, where s is half the perimeter:
For sides 5, 7 and 8, s is 10 and the area is 17.3205, which is exactly 10√3. The inradius is the area divided by s, and the circumradius is abc divided by four times the area.
Worked examples
Closing a fence corner
Dana has two fence runs, 12 m and 9 m long, that meet at a 75° corner. She wants the length of the third run that closes the plot. That is the SAS case, with a = 12, c = 9 and the angle between them B = 75°.
The law of cosines gives the closing side b = 13 m. The other two corners are A = 63.05° and C = 41.95°, and the plot covers 52.16 m². Order 13 m of fencing plus a little for the posts.
How wide is the river?
Two hikers stand 100 m apart on one bank and sight the same tree on the far bank. The angles between their baseline and the tree are 62° and 71°. That is the ASA case: two angles and the side between them.
The tree's angle is C = 180° − 62° − 71° = 47°. The law of sines then gives the two sight lines, 129.28 m and 120.73 m. The width of the river is the height of the triangle above the baseline, the altitude to side c: 114.15 m. If the second angle was really 72°, the width would be 116.74 m instead of 114.15 m, from a single degree. The what-if table under the tool shows this for every input.
A homework question with two answers
Leo's worksheet gives a = 6, b = 10 and A = 30°, and asks for the rest. The angle is not between the two sides, so this is SSA. The law of sines gives sin B = 0.8333, and two angles have that sine.
Both work. B = 56.44° gives C = 93.56° and c = 11.98. B = 123.56° gives C = 26.44° and c = 5.34. The answer panel shows both, and the switch above them redraws the triangle for either one.
Reading your result
The missing values are listed in the order the working finds them. Lengths come back in the same unit you typed, so meters in means meters out. Angles follow the deg and rad switch.
The type comes from the largest angle. Under 90° makes the triangle acute, exactly 90° makes it right, and over 90° makes it obtuse. The tool calls a triangle right when its largest angle is within a ten-millionth of a degree of 90°, so 3, 4, 5 is right but 3, 4, 5.01 is not. The side type is equilateral, isosceles (two equal sides) or scalene (none equal).
The circumradius tells you where the circumcenter sits. It is inside an acute triangle, on the long side of a right triangle, and outside an obtuse one. Pick Circumcircle above the drawing to see it.
In the SSA case the count of triangles depends on how long side a is compared with the height it must reach. For A = 30° and b = 10, that height is 5:
| Side a | Triangles | Angle B |
|---|---|---|
| 4 | 0 | none |
| 5 | 1 | 90° |
| 7 | 2 | 45.58° or 134.42° |
| 10 | 1 | 30° |
| 12 | 1 | 24.62° |
Shorter than 5, side a never reaches the base. Exactly 5, it meets it at a right angle. Between 5 and 10, it can land in two places. At 10 or more, only one triangle is left. This pattern is set out in Stewart, Redlin and Watson's Precalculus, section 6.5.
Common mistakes
- Mixing up which side is opposite which angle. Side a must be across from angle A. If your sketch labels them differently, rename the corners before you type, or the law of sines pairs the wrong numbers.
- Choosing SAS when the angle is not between the sides. In SAS the angle sits where the two known sides meet. If it is at the far end of one side, you have SSA and possibly two answers.
- A calculator left in radians. sin 30 in radian mode is −0.988, not 0.5. Here the deg and rad switch converts the boxes for you, so check it matches your numbers.
- Taking an angle from an inverse sine. sin 30° and sin 150° are both 0.5. If the angle you need could be obtuse, find it with the law of cosines instead.
- Rounding early. Rounding the third angle or a sine to two places before the law of sines carries that error into every side after it. Keep four places or more until the last step, then round once.
- Sides that cannot meet. Each side must be shorter than the other two together. Lengths 1, 2 and 3 lie flat and make no triangle at all.
Questions people ask
Sources
- Stewart, Redlin and Watson, Precalculus: Mathematics for Calculus, 7th edition, sections 6.5 (the law of sines) and 6.6 (the law of cosines)
- NIST Digital Library of Mathematical Functions, section 4.42 (solution of triangles)