Triangle Calculator
- Updated
- Formula shown
- Free, no sign-up
Results
Triangle with sides 6, 8 and 9, angles 40.804°, 60.611° and 78.585°, and area 23.5253 units²
| Side | Height onto it | Median to it |
|---|---|---|
| a | 7.8418 | 7.9687 |
| b | 5.8813 | 6.5192 |
| c | 5.2278 | 5.4544 |
How to use the triangle calculator
- Pick what you know: three sides (SSS), two sides and the angle between them (SAS), two angles and the side between them (ASA), two angles and another side (AAS), or two sides and an angle that is not between them (SSA).
- Enter the three values. Angles are in degrees. Side a is always opposite angle A, b opposite B and c opposite C, as the drawing shows.
- Optionally choose a length unit. It only labels the answers; the shape is the same in any unit.
- Read the results. If two triangles fit your SSA values, switch between them with the buttons above the results.
Triangle formulas
Law of sines: a ÷ sin A = b ÷ sin B = c ÷ sin C = 2R
Angle sum: A + B + C = 180°
Heron's formula: Area = √(s(s − a)(s − b)(s − c)), s = (a + b + c) ÷ 2
Heights: hₐ = 2 × Area ÷ a · Inradius r = Area ÷ s · Circumradius R = abc ÷ (4 × Area)
The law of cosines links all three sides with one angle, so it is the starting point whenever you know three sides (to find an angle) or two sides and the angle between them (to find the third side). The law of sines says each side divided by the sine of its opposite angle gives the same number, which equals the diameter of the circle through the three corners (2R). Once two angles are known, the third is whatever is left of 180°. Heron's formula gives the area from the sides alone, where s is the semiperimeter. This calculator uses a rearranged, numerically stable version of Heron's formula so that long, thin triangles stay accurate.
Which method for which inputs
- SSS: law of cosines for two angles, then the angle sum. The sides must satisfy the triangle inequality: each side shorter than the other two added together.
- SAS: law of cosines for the third side, then the remaining angles.
- ASA and AAS: the third angle from the angle sum, then the law of sines for the missing sides.
- SSA: the law of sines gives sin B, but a sine value matches two angles (B and 180° − B), so there may be zero, one or two triangles.
- Three angles (AAA) are not enough: they fix the shape but not the size, so you need at least one length.
Worked example: three sides
Take sides a = 6, b = 8 and c = 9. The law of cosines gives cos A = (8² + 9² − 6²) ÷ (2 × 8 × 9) = 109 ÷ 144, so A = 40.8°. In the same way B = 60.61°, which leaves C = 180° − A − B = 78.58°. The semiperimeter is s = (6 + 8 + 9) ÷ 2 = 11.5, and Heron's formula gives an area of √(11.5 × 5.5 × 3.5 × 2.5) = 23.53 square units. The height onto side c is 2 × 23.53 ÷ 9 = 5.23, the inradius is 2.046 and the circumradius is 4.591. Every angle is under 90°, so it is an acute scalene triangle.
Worked example: the ambiguous case (SSA)
Suppose a = 7, b = 10 and A = 30°. The height from corner C down to side c is b × sin A = 10 × 0.5 = 5. Because side a (7) is longer than that height but shorter than b (10), it can meet the third side in two places. The law of sines gives sin B = 10 × sin 30° ÷ 7 = 0.7143, so B = 45.58° (then C = 104.42° and c = 13.56) or B = 134.42° (then C = 15.58° and c = 3.76). Both triangles are valid, and the calculator shows each one.
| Given angle A | Condition (h = b × sin A) | Triangles |
|---|---|---|
| Under 90° | a < h | 0 |
| Under 90° | a = h | 1 (right angle at B) |
| Under 90° | h < a < b | 2 |
| Under 90° | a ≥ b | 1 |
| 90° or more | a ≤ b | 0 |
| 90° or more | a > b | 1 |
Common triangles
Angles, area and the two special radii of some familiar triangles, solved with this calculator's engine.
| Triangle | Sides | Angles | Area | Inradius | Circumradius |
|---|---|---|---|---|---|
| 3-4-5 right triangle | 3, 4, 5 | 36.9°, 53.1°, 90° | 6 | 1 | 2.5 |
| 5-12-13 right triangle | 5, 12, 13 | 22.6°, 67.4°, 90° | 30 | 2 | 6.5 |
| Equilateral, side 1 | 1, 1, 1 | 60°, 60°, 60° | 0.433 | 0.289 | 0.577 |
| 45-45-90, legs 1 | 1, 1, 1.41 | 45°, 45°, 90° | 0.5 | 0.293 | 0.707 |
| 30-60-90, short leg 1 | 1, 1.73, 2 | 30°, 60°, 90° | 0.866 | 0.366 | 1 |
| Isosceles 5-5-8 | 5, 5, 8 | 36.9°, 36.9°, 106.3° | 12 | 1.333 | 4.167 |
| Scalene 7-8-9 | 7, 8, 9 | 48.2°, 58.4°, 73.4° | 26.833 | 2.236 | 4.696 |
Tips and common mistakes
- Keep the letters matched. Most errors come from putting an angle opposite the wrong side. Check the drawing: side a never touches corner A.
- Use the longest side for the largest angle. The biggest angle is always opposite the longest side, which is a quick sanity check on any answer.
- Watch for SSA. If a textbook question gives two sides and a non-included angle, look for a second solution before you finish.
- Round at the end. Rounding an angle to one decimal and then reusing it can shift the last digits of a side; this calculator carries full precision throughout.
- For right triangles, the right triangle calculator accepts any two values, and the Pythagorean theorem calculator shows the a² + b² = c² working. For other flat shapes, use the area calculator.
Frequently asked questions
How do I find the angles of a triangle from its three sides?
Use the law of cosines: cos A = (b² + c² − a²) ÷ (2bc), and the same pattern for B. The third angle is 180° minus the other two. For sides 6, 8 and 9, cos A = 109 ÷ 144, so A ≈ 40.80°, B ≈ 60.61° and C ≈ 78.58°.
How do I find the area of a triangle when I only know the sides?
Use Heron's formula: work out the semiperimeter s = (a + b + c) ÷ 2, then Area = √(s(s − a)(s − b)(s − c)). For sides 6, 8 and 9, s = 11.5 and the area is √(11.5 × 5.5 × 3.5 × 2.5) ≈ 23.53 square units.
What is the ambiguous case of a triangle?
It happens when you know two sides and an angle that is not between them (SSA). A sine value fits two angles, so up to two triangles can match. With a = 7, b = 10 and A = 30°, angle B can be about 45.58° (c ≈ 13.56) or 134.42° (c ≈ 3.76).
Can any three lengths make a triangle?
No. Each side must be shorter than the other two added together (the triangle inequality). Sides 2, 3 and 6 fail because 2 + 3 is less than 6, and sides 1, 2 and 3 only make a flat line with zero area.
What are the inradius and circumradius of a triangle?
The inradius is the radius of the largest circle that fits inside the triangle: area ÷ semiperimeter. The circumradius is the radius of the circle through all three corners: abc ÷ (4 × area). For a 3-4-5 triangle they are exactly 1 and 2.5.