calc-hub logocalc-hub.net
How to Solve a Triangle: SSS, SAS, ASA, SSA
MathGeometryTrigonometryTrianglesCalculators

How to Solve a Triangle: SSS, SAS, ASA, SSA

T. Krause

Match your three known values to a case, then use the law of cosines or the law of sines. Sides of 8, 10 and 13 give angles of 37.96°, 50.25° and 91.79°.

To solve a triangle, match the three values you know to a case, then use the law of cosines for SSS and SAS or the law of sines for ASA, AAS and SSA. Sides of 8, 10 and 13, for example, give angles of 37.96°, 50.25° and 91.79°.

Throughout this article, side a is opposite angle A, b is opposite B and c is opposite C. The two laws are:

  • Law of cosines: c² = a² + b² − 2ab·cos C
  • Law of sines: a/sin A = b/sin B = c/sin C

The angles also add up to 180°, which often saves you the last step. You need at least one side, because three angles alone fix a triangle's shape and leave its size open.

Which case do you have?

CaseWhat you knowStart withTriangles possible
SSSThree sidesLaw of cosines0 or 1
SASTwo sides and the angle between themLaw of cosines1
ASATwo angles and the side between themAngle sum, then law of sines0 or 1
AASTwo angles and a side not between themAngle sum, then law of sines0 or 1
SSATwo sides and an angle not between themLaw of sines0, 1 or 2

SSS: sides 8, 10 and 13

Rearrange the law of cosines to get each angle from the three sides. Here a = 8, b = 10 and c = 13.

  1. cos A = (b² + c² − a²) ÷ 2bc = (100 + 169 − 64) ÷ 260 = 0.7885, so A = 37.96°.
  2. cos B = (a² + c² − b²) ÷ 2ac = (64 + 169 − 100) ÷ 208 = 0.6394, so B = 50.25°.
  3. C = 180° − 37.96° − 50.25° = 91.79°.

For the area, use Heron's formula with half the perimeter, s = 15.5. The area is √(15.5 × 7.5 × 5.5 × 2.5) = 39.98.

Each side must be shorter than the other two added together. Sides of 2, 3 and 6 can't close, so they form no triangle.

SAS: sides 9 and 15 with a 40° angle between them

Here a = 9, b = 15 and C = 40°.

  1. c² = 81 + 225 − 270 × cos 40° = 306 − 206.83 = 99.17, so c = 9.96.
  2. sin A = 9 × sin 40° ÷ 9.9583 = 0.5809, so A = 35.52°.
  3. B = 180° − 40° − 35.52° = 104.48°.
  4. The area is ½ab·sin C = ½ × 9 × 15 × sin 40° = 43.39.

Step 2 finds the smaller unknown angle on purpose, because the sine alone can't tell an acute angle from an obtuse one. Go straight for B and you get sin B = 0.9682, which a calculator's inverse sine reports as 75.52°. The real angle is 180° − 75.52° = 104.48°. The angle opposite the shorter of the two remaining sides is always acute, so start there.

Keep the unrounded c through step 2. With c rounded to 9.96, A comes out as 35.51°, off by 0.01°.

ASA: angles 35° and 65° with a side of 20 between them

Here A = 35°, B = 65° and c = 20.

  1. C = 180° − 35° − 65° = 80°.
  2. a = 20 × sin 35° ÷ sin 80° = 11.65.
  3. b = 20 × sin 65° ÷ sin 80° = 18.41.

The area, ½ab·sin C, is 105.57, and the perimeter is 50.05. If the two angles add up to 180° or more, no room is left for the third and there is no triangle.

AAS takes the same steps with a different side as the starting point. Make the known side a = 20, opposite the 35° angle, and you get b = 31.60 and c = 34.34 for the same three angles.

SSA: the case that can give two answers

Here A = 35°, a = 8 and b = 12. Before any trigonometry, compare side a with the height h = b × sin A = 12 × sin 35° = 6.88. Side a is longer than the height and shorter than b, so it can reach the third side in two places.

The law of sines gives sin B = 12 × sin 35° ÷ 8 = 0.8604. Two angles have that sine, 59.36° and 120.64°, and both leave room for C.

TriangleAngle BAngle CSide cAreaPerimeter
159.36°85.64°13.9147.8633.91
2120.64°24.36°5.7519.8025.75

Change only side a and the count changes with it. With a = 5, shorter than the height, sin B would be 1.38, and no angle has a sine above 1, so there is no triangle. With a = 14, longer than b, there is one: B = 29.45°, C = 115.55° and c = 22.02. The other candidate for B, 150.55°, plus the 35° of A passes 180°.

The full table of SSA conditions, including angles of 90° or more, is on the calculator page.

What the calculator takes and returns

The triangle calculator has a mode for each of the five cases and takes angles in degrees only. Every example above returns the same figures there, with sides, area and perimeter to as many as 4 decimal places and angles to as many as 2. It shows results without the steps.

The field labels are fixed, so rename your triangle to match them before you type:

  • SAS asks for sides a and b and the angle C between them.
  • ASA asks for angles A and B and the side c between them.
  • AAS asks for angles A and B and the side a opposite A.
  • SSA asks for angle A, the side a opposite it, and side b.

For SSA it lists both triangles when two fit. When none fits, it says so and gives the reason, such as a side shorter than the height. It has no mode for three angles.

If you only need one law, the law of cosines calculator covers SSS and SAS and the law of sines calculator covers ASA, AAS and SSA. With a 90° angle, the right triangle calculator is quicker.

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking "Accept", you agree to our use of cookies.
Learn more.