Triangle Calculator
Label what you know – sides a, b, c and the opposite angles A, B, C – and the missing values are solved with the law of sines or cosines, each step written out, the triangle drawn to scale and both answers shown when two triangles fit.
Quick answer: A triangle with sides 7, 8 and 9 has angles of 48.19°, 58.41° and 73.40°: the law of cosines gives A = arccos((8² + 9² − 7²) ÷ (2 × 8 × 9)) = arccos(0.6667), and Heron’s formula gives an area of √(12 × 5 × 4 × 3) = 26.83.
Not rated yet · Updated · Free · No sign-up
Triangle Calculator inputs
Result
Solved triangle (right scalene)
A = 36.87°, B = 53.13°, C = 90°
Sides 3, 4, 5
- Area
- 6
- Perimeter
- 12
- Type
- right scalene
| Sides a, b, c | 3, 4, 5 |
| Angles A, B, C | 36.8699°, 53.1301°, 90° |
| Angles in radians | 0.6435, 0.9273, 1.5708 |
| Heights hₐ, h_b, h_c | 4, 3, 2.4 |
| Semi-perimeter s | 6 |
| Inradius r = Area ÷ s | 1 |
| Circumradius R = a ÷ (2 sin A) | 2.5 |
Step by step
- Law of cosines: A = arccos((b² + c² − a²) ÷ 2bc) = arccos((4² + 5² − 3²) ÷ (2 × 4 × 5)) = 36.8699°
- B = arccos((a² + c² − b²) ÷ 2ac) = 53.1301°
- C = 180° − A − B = 90°
- Area (Heron’s formula): √(s(s − a)(s − b)(s − c)) = √(6 × 3 × 2 × 1) = 6
- Perimeter: 3 + 4 + 5 = 12
Calculated with CalcBright – https://calcbright.com/triangle-calculator on
Three facts fix a triangle – but not any three
A triangle has six measurements: three sides and three angles. Label the sides a, b and c and the angle opposite each one A, B and C, and three of the six are enough to find the rest – provided at least one of them is a side. Three angles alone fix the shape but not the size, and two sides with an angle that is not between them (SSA) can fit two different triangles. Two laws do all the work. The law of cosines is Euclid’s Book II, Propositions 12 and 13, written with a cosine; the law of sines follows from the circle drawn through the three corners.
c² = a² + b² − 2ab·cos C · a ÷ sin A = b ÷ sin B = c ÷ sin C · A + B + C = 180°
Which law do I use?
| You know | First step | Then | Triangles |
|---|---|---|---|
| SSS – three sides | Law of cosines for one angle | Law of cosines again, third angle from 180° | 1 (if the sides pass the triangle inequality) |
| SAS – two sides and the angle between | Law of cosines for the third side | Angles as in SSS | 1 |
| ASA – two angles and the side between | Third angle = 180° − A − B | Law of sines for the two other sides | 1 |
| AAS – two angles and another side | Third angle = 180° − A − B | Law of sines | 1 |
| SSA – two sides and an angle not between | Law of sines for the second angle | Check 180° − that angle as well | 0, 1 or 2 |
The rule of thumb: the law of sines needs a matched pair – a side and the angle opposite it. If you don’t have one (SSS or SAS), start with the law of cosines.
Worked examples
The corner of a plot (SAS)
Two boundary walls of 40 m and 30 m meet at 75°, and you need the length of the open side and the area. The law of cosines gives c² = 40² + 30² − 2 × 40 × 30 × cos 75° = 2,500 − 621.17 = 1,878.83, so c = 43.35 m. The other two angles are 63.05° and 41.95°, and the area is ½ × 40 × 30 × sin 75° = 579.56 m². Had the corner been a right angle, the open side would be 50 m and the area 600 m² – a 15° error in the corner changes the area by 20 m².
The width of a river (ASA)
Mark two points A and B 100 m apart along one bank and sight a tree on the far bank from both: 62° at A and 48° at B. The angle at the tree is 180° − 62° − 48° = 70°, and the law of sines gives the sightlines: from A, b = 100 × sin 48° ÷ sin 70° = 79.08 m; from B, a = 93.96 m. The river’s width is the height of the triangle from the tree to the baseline: 69.83 m (shown as hc). This is the classic surveying use the US Common Core standard names for these laws.
Two triangles from the same data (SSA)
Take a = 7, b = 10 and A = 40°. The law of sines gives sin B = 10 × sin 40° ÷ 7 = 0.9183, and two angles have that sine: B = 66.67° and B = 113.33°. Both leave room for a third angle, so both triangles exist – one acute with c = 10.43 and an area of 33.53, one obtuse with c = 4.89 and an area of 15.71. A calculator key returns only the first; the page shows both and draws each to scale. The test before you start: with A acute, compute b·sin A = 6.43. If a is below that there is no triangle, between 6.43 and 10 there are two, and from 10 up there is one.
Acute, right or obtuse – the side test
You don’t need the angles to classify a triangle. Square the longest side and compare it with the other two squared and added:
| Sides | Longest² | Others² added | Type | Largest angle |
|---|---|---|---|---|
| 7, 8, 9 | 81 | 113 | acute | 73.40° |
| 3, 4, 5 | 25 | 25 | right | 90° |
| 5, 12, 13 | 169 | 169 | right | 90° |
| 2, 3, 4 | 16 | 13 | obtuse | 104.48° |
| 2, 3, 6 | no triangle – 2 + 3 is less than 6 | – | ||
A builder’s 3-4-5 check works for the same reason: if the diagonal of a corner marked 3 m and 4 m along the walls is exactly 5 m, the corner is square.
Right triangles
A right triangle is just a triangle with one angle fixed at 90°, so enter that angle as one of your three facts. A ladder is the everyday case: the UK Health and Safety Executive tells ladder users to set a leaning ladder at 75°, the “1 in 4 rule” – one unit out for every four up. Enter A = 90° (the corner at the wall), B = 75° (the foot) and a = 6 m (the ladder) in AAS: the ladder reaches 5.80 m up the wall with its foot 1.55 m out. That ratio is 3.73 to 1; an exact 1 in 4 corresponds to 75.96°, which is why the rule is a rule of thumb rather than a formula.
Things that change the answer
- Labelling. Side a must be opposite angle A. Typing the angle between a and b as “A” turns an SAS problem into an SSA one with a different answer.
- Degrees or radians. All angles here are in degrees. A scientific calculator left in radian mode gives cos 75 = 0.92 instead of 0.26, and the plot’s open side comes out at 16.96 m instead of 43.35 m.
- Rounding too early. Keep full precision until the end; rounding sin B from 0.9183 to 0.92 in the SSA example moves B from 66.67° to 66.93°.
- The second SSA answer. arcsin never returns an angle above 90°, so the obtuse triangle is easy to miss.
Common mistakes
- Using the law of sines with no matched side-angle pair.
- Taking the third angle from 180° before checking that the first two add up to less than 180°.
- Forgetting the ½ in ½ab·sin C, or using a side that is not next to angle C.
- Assuming a corner is 90° because it looks square – the plot example shows what 15° costs.
When to get help
For land boundaries and areas that go on a title deed or sale contract, the measurement that counts is a licensed surveyor’s – use this calculator to check a plan, not to replace it. Roof pitches, stair stringers and loads on sloping members need a structural engineer or the building code’s span tables, not just geometry. For coursework, the step-by-step working shows which law was used at each step, so you can copy the method rather than the number.
Frequently asked questions
How do you find the angles of a triangle from three sides?
Use the law of cosines for one angle, cos A = (b² + c² − a²) ÷ 2bc, then repeat for a second and take the third from 180°. For sides 7, 8 and 9, cos A = 96 ÷ 144 = 0.6667, so A = 48.19°, B = 58.41° and C = 73.40°.
How do you find the third side from two sides and the angle between them?
Law of cosines: c² = a² + b² − 2ab·cos C. Two plot boundaries of 40 m and 30 m meeting at 75° give c² = 1,600 + 900 − 2,400 × 0.2588 = 1,878.83, so the closing side is 43.35 m and the plot is 579.56 m².
When do you use the law of sines and when the law of cosines?
Use the law of cosines when you know three sides, or two sides and the angle between them (SSS, SAS). Use the law of sines when you know a side and the angle opposite it, which is what ASA and AAS give you once the third angle is found from 180°.
What is the SSA ambiguous case?
With two sides and an angle that is not between them, the third side can swing to two places. When angle A is acute and b·sin A < a < b, two triangles fit: a = 7, b = 10 and A = 40° give B = 66.67° with c = 10.43, or B = 113.33° with c = 4.89.
How do you find the area of a triangle from three sides?
Heron’s formula: halve the perimeter to get s, then area = √(s(s − a)(s − b)(s − c)). For 7, 8 and 9, s = 12 and the area is √(12 × 5 × 4 × 3) = √720 = 26.83. With two sides and the angle between them, ½ab·sin C gives the same result.
Can any three lengths make a triangle?
No – each side must be shorter than the other two added together (the triangle inequality). 2, 3 and 6 cannot close because 2 + 3 = 5 is less than 6, while 2, 3 and 4 can, giving a triangle with angles of 28.96°, 46.57° and 104.48°.
How can you tell if a triangle is acute, right or obtuse from its sides?
Compare the square of the longest side with the sum of the squares of the other two. 7, 8, 9: 81 < 113, so acute; 3, 4, 5: 25 = 25, so right; 2, 3, 4: 16 > 13, so obtuse.
How do I solve a right triangle with this calculator?
Enter the 90° angle as one of the known angles. With the two legs use SAS and C = 90°; with the hypotenuse and one leg use SSA with A = 90°, a = hypotenuse – a = 13, b = 5 gives the other leg 12 and angles of 22.62° and 67.38°.
What changed
- – Page fully reviewed: every result rechecked against the law of cosines, the law of sines and Heron’s formula; key rules, six worked scenarios (plot corner, river width, ambiguous case, right triangle, ladder), a “which law?” table, a side-test table for acute/right/obtuse and the common mistakes added.
Sources
- Euclid’s Elements, Book I – Prop. 20 (triangle inequality), Prop. 32 (angles sum to two right angles), Props. 47–48 (Pythagoras and its converse); D. E. Joyce edition, Clark University
- Euclid’s Elements, Book II – Props. 12 and 13 (the square on the side opposite an obtuse or acute angle: the geometric law of cosines)
- Common Core State Standards for Mathematics – HSG-SRT.D.9 (derive A = ½ab sin C) and HSG-SRT.D.11 (apply the Law of Sines and the Law of Cosines in right and non-right triangles)
- AQA GCSE Mathematics (8300) specification, 3.4 Geometry and measures – G22 (sine and cosine rules) and G23 (Area = ½ab sin C)
- Health and Safety Executive – Safe use of ladders and stepladders (INDG455): the 75° angle and the 1 in 4 rule
Last reviewed: ·
Reviewed by Chelsea, CalcBright's animated guide, for the CalcBright editorial team · How we check our numbers
Rate the Triangle Calculator
Only the average star rating is shown. Error reports go straight to our inbox so we can check and fix them. See our Methodology and privacy policy.