Triangle Calculator (Right Triangle & SSS Solver, with Diagram)
Geometry & trigFreeNo sign-up
To solve a triangle, you need three measurements, and at least one of them must be a side. For sides 13, 14 and 15, the law of cosines gives the angles A = 53.13°, B = 59.49° and C = 67.38°, and Heron’s formula gives an area of 84. The triangle calculator below handles any three values, including right triangles.
With sides 13, 14 and 15, the law of cosines gives A = 53.13°, B = 59.49° and C = 67.38°. The area is 84 and the perimeter is 42.
| Line segment | a (from A) | b (from B) | c (from C) |
|---|---|---|---|
| Height (altitude) | 12.92 | 12 | 11.2 |
| Median | 12.97 | 12.17 | 11.24 |
| Angle bisector | 12.95 | 12.09 | 11.22 |
Show steps
- Case SSS (three sides). Check the triangle inequality: the longest side c = 15 is less than b + a = 27, so a triangle exists.
- No angle is known, so use the law of cosines for the largest angle C (across from the longest side): cos C = (b² + a² − c²)/(2·b·a) = 0.3846, so C = 67.38°.
- The other two angles must be acute, so the law of sines is safe: sin B = b·sin C/c = 0.8615, so B = 59.49°.
- Angles add to 180°: A = 180° − 67.38° − 59.49° = 53.13°.
- Area by Heron’s formula: s = (a + b + c)/2 = 21, so Area = √(s(s − a)(s − b)(s − c)) = 84. Perimeter = a + b + c = 42.
- Heights (altitudes): height to a = 2·Area/a = 12.92, to b = 2·Area/b = 12, to c = 2·Area/c = 11.2.
- Medians: the median to a = ½√(2b² + 2c² − a²) = 12.97; in the same way the median to b = 12.17 and to c = 11.24.
- Angle bisectors: from A, 2bc·cos(A/2)/(b + c) = 12.95; from B = 12.09; from C = 11.22.
- Inradius r = Area/s = 4; circumradius R = a/(2 sin A) = 8.13. This is an acute scalene triangle.
Rounded values are shown, but every step uses full precision.
How to use the triangle calculator
- Choose Any 3 values for a general triangle, or Right triangle if one angle is 90°.
- Fill in the values you know and leave the other boxes empty: three values for a general triangle, two for a right triangle. Side a is always across from angle A, side b from B and side c from C.
- Pick degrees or radians and the number of decimal places.
- Read the missing sides and angles, then the area, perimeter, triangle type, heights, medians, angle bisectors, inradius and circumradius. The diagram is drawn to scale.
- Open Show steps to see which law was used and why, with every substitution written out.
Which case do you have?
The calculator detects the case from the boxes you fill in. Each case has a standard method:
| Case | What you know | Method | Number of triangles |
|---|---|---|---|
| SSS | three sides | law of cosines | 1, if the triangle inequality holds |
| SAS | two sides and the angle between them | law of cosines, then law of sines | 1 |
| ASA | two angles and the side between them | angle sum, then law of sines | 1 |
| AAS | two angles and a side not between them | angle sum, then law of sines | 1 |
| SSA | two sides and an angle not between them | law of sines, ambiguous case | 0, 1 or 2 |
| AAA | three angles | not solvable | infinitely many (similar triangles) |
Law of cosines and law of sines
The law of cosines links all three sides with one angle: c² = a² + b² − 2ab·cos C. Use it when no side is paired with its opposite angle (SSS and SAS). When C = 90°, cos C = 0 and it becomes the Pythagorean theorem.
The law of sines says a/sin A = b/sin B = c/sin C. Use it once you know a side together with its opposite angle (ASA, AAS, SSA, and the second half of SAS). For a full walk-through of both laws, see the law of sines and cosines calculator.
The ambiguous case (SSA)
With two sides and an angle that is not between them, the side opposite the angle can swing like a hinge. Take a = 6, b = 8 and A = 40°. The height from C is h = b·sin A = 8 sin 40° ≈ 5.14. Since h < a < b, side a reaches the base in two places, so two triangles fit: B ≈ 58.99° with c ≈ 9.22, or B ≈ 121.01° with c ≈ 3.04. The calculator draws both and lists both in a comparison table. If a were shorter than h (for example a = 4) there would be no triangle, and if a ≥ b there is exactly one.
Right triangle formulas
In a right triangle with legs a and b and hypotenuse c, the Pythagorean theorem gives c² = a² + b², and the acute angles add to 90°. The trig ratios link angles and sides: sin A = a/c, cos A = b/c and tan A = a/b (SOH-CAH-TOA). For legs 5 and 12, c = √169 = 13 and A = arctan(5/12) ≈ 22.62°. The Pythagorean theorem calculator focuses on the missing side, and the special right triangles calculator handles 30-60-90 and 45-45-90 triangles exactly.
Area, heights, medians and radii
| Measurement | Formula | For sides 13, 14, 15 |
|---|---|---|
| Area (Heron) | √(s(s − a)(s − b)(s − c)), s = (a + b + c)/2 | s = 21, area = 84 |
| Area (two sides and angle) | ½ab·sin C | 84 |
| Height to side a | 2·Area/a | 168/13 ≈ 12.92 |
| Median to side c | ½√(2a² + 2b² − c²) | ≈ 11.24 |
| Inradius r | Area/s | 4 |
| Circumradius R | abc/(4·Area) | 8.125 |
The Heron’s formula calculator shows the area working in more detail.
Worked examples
Example 1: SAS
a = 5, b = 7 and C = 60°. Law of cosines: c² = 25 + 49 − 2·5·7·cos 60° = 74 − 35 = 39, so c = √39 ≈ 6.24. Law of sines for the angle across from the shorter side: sin A = 5 sin 60°/6.24, so A ≈ 43.90°, and B = 180° − 60° − 43.90° ≈ 76.10°.
Example 2: ASA
A = 40°, c = 10 and B = 60°. The third angle is C = 180° − 40° − 60° = 80°. Then a = 10 sin 40°/sin 80° ≈ 6.53 and b = 10 sin 60°/sin 80° ≈ 8.79.
Common mistakes
| Mistake | How to avoid it |
|---|---|
| Mixing up which side goes with which angle | Side a is always across from angle A. Label your sketch before you type. |
| Calculator in radian mode | sin 30 in radians is about −0.988, not 0.5. Check the angle unit. |
| Missing the second SSA triangle | arcsin only returns angles up to 90°. Always test 180° − B as well. |
| Rounding early | Keep full precision until the end; rounded angles may not add to exactly 180°. |
Triangles practice quiz: 10 questions
Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.
With three sides (SSS) no angle is known, so no side-angle pair exists for the law of sines. The law of cosines gives the first angle.
The triangle inequality needs the two shorter sides to add up to more than the longest: 4 + 7 = 11, which is less than 12.
h = b·sin A = 8 sin 40° ≈ 5.14. Since h is less than a = 6, which is less than b = 8, side a can meet the base in two places.
8² + 15² = 64 + 225 = 289 = 17², so the angle across from 17 is exactly 90°.
Quiz complete
Frequently asked questions
How do you find the hypotenuse of a right triangle?
Use the Pythagorean theorem c = √(a² + b²). For legs 5 and 12, c = √(25 + 144) = √169 = 13.
How do you calculate the angles of a triangle?
In a right triangle, use the inverse tangent: legs 3 and 4 give arctan(3/4) ≈ 36.87° and arctan(4/3) ≈ 53.13°. For any triangle with three known sides, use the law of cosines for one angle at a time. The three angles always add to 180°.
How do you find the area of a triangle from three sides?
Use Heron's formula. For sides 13, 14 and 15, s = 21 and the area is √(21 × 8 × 7 × 6) = √7056 = 84. If you know a base and its height, use ½ × base × height instead.
How do you find the third side of a triangle?
In a right triangle, rearrange the Pythagorean theorem: with c = 10 and a = 6, b = √(100 − 36) = 8. In any other triangle you also need an angle: with two sides and the angle between them, use the law of cosines.
How do you know if a triangle is a right triangle?
Check whether the squares of the two shorter sides add up to the square of the longest. For 8, 15, 17: 64 + 225 = 289 = 17², so it is a right triangle. For 6, 7, 9: 36 + 49 = 85, which is more than 81, so the largest angle is acute (about 87.27°) and the triangle is not right.
How do you know if three sides form a triangle?
Use the triangle inequality: the two shorter sides must add up to more than the longest side. 5, 6 and 9 work because 5 + 6 = 11 > 9. 3, 4 and 8 do not, because 3 + 4 = 7 is less than 8.
Related calculators
- Special right triangles calculator
- Heron's formula calculator
- Pythagorean theorem calculator
- Law of sines and cosines calculator
- Area and perimeter calculator
- Inverse trig calculator
More geometry & trig calculators
Related to This Article
More math articles
- The Best Grade 7 ELA Practice Tests for Wyoming Students
- What Sociology Studies
- Mississippi MAAP Grade 8 Math Free Worksheets: 72 Free Skill-by-Skill PDFs with Answer Keys
- How to Unravel the Essential Properties of Rectangles
- Expected Value Calculator (Free, Step-by-Step)
- Reading Clocks
- The Best Algebra 1 Book for Mississippi Students
- Immunity, Reproduction and Development: Compare Cell Roles
- Calculus: Navigating the Pathways of Particles
- CSET Mathematics Flashcards












What people say about "Triangle Calculator: Solve Any Triangle, With Diagram"?
No one replied yet.