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.

Triangle calculator: what do you know?
Fill in exactly three boxes, including at least one side, and leave the others empty. Side a is across from angle A, b from B, c from C. The calculator detects the case (SSS, SAS, ASA, AAS or SSA) and picks the law of sines or cosines.
Try:
SSS: law of cosines, then law of sines
A = 53.13°B = 59.49°, C = 67.38°

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.

Side a13
Side b14
Side c15
Angle A53.13°
Angle B59.49°
Angle C67.38°
Area84
Perimeter42
Triangle typeacute scalene
Semiperimeter s21
Inradius r4
Circumradius R8.13
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
hACb = 14Ba = 13c = 1553.13°59.49°67.38°
triangle drawn to scaleheight h from C to side c
Show steps
  1. Case SSS (three sides). Check the triangle inequality: the longest side c = 15 is less than b + a = 27, so a triangle exists.
  2. 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°.
  3. 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°.
  4. Angles add to 180°: A = 180° − 67.38° − 59.49° = 53.13°.
  5. 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.
  6. Heights (altitudes): height to a = 2·Area/a = 12.92, to b = 2·Area/b = 12, to c = 2·Area/c = 11.2.
  7. 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.
  8. Angle bisectors: from A, 2bc·cos(A/2)/(b + c) = 12.95; from B = 12.09; from C = 11.22.
  9. 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.

Triangle Calculator (Right Triangle & SSS Solver, with Diagram)
Embed this calculator on your site

Free to use on class pages, blogs and course pages. Copy the code below and paste it into your page:

How to use the triangle calculator

  1. Choose Any 3 values for a general triangle, or Right triangle if one angle is 90°.
  2. 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.
  3. Pick degrees or radians and the number of decimal places.
  4. 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.
  5. 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.

Question 1 of 10
1. A right triangle has legs 9 and 12. How long is the hypotenuse?

Found a mistake? Let us know!

2. Two angles of a triangle are 47° and 68°. What is the third angle?

Found a mistake? Let us know!

3. Which method should you start with for a triangle with sides 7, 8 and 9?

Found a mistake? Let us know!

4. What is the area of a triangle with sides 5, 5 and 6?

Found a mistake? Let us know!

5. In a triangle, a = 8, b = 11 and C = 90° is between them. What is c, to two decimals?

Found a mistake? Let us know!

6. Can sides 4, 7 and 12 form a triangle?

Found a mistake? Let us know!

7. With a = 6, b = 8 and A = 40° (SSA), how many triangles are possible?

Found a mistake? Let us know!

8. A right triangle has hypotenuse 10 and angle A = 30°. How long is side a (opposite A)?

Found a mistake? Let us know!

9. What is the inradius of a triangle with area 84 and perimeter 42?

Found a mistake? Let us know!

10. A triangle has sides 8, 15 and 17. What type is it?

Found a mistake? Let us know!

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

More geometry & trig calculators

Browse all 206 calculators

Related to This Article

What people say about "Triangle Calculator: Solve Any Triangle, With Diagram"?

No one replied yet.

Leave a Reply