Triangle calculator: solve SSS, SAS, ASA, AAS and SSA

Enter any three of sides a, b, c and angles A, B, C to solve the triangle, with steps and a drawing to scale. Runs on your device.

How it works

  1. Fill in any three of the six boxes, at least one a side
  2. Read the missing sides and angles, area and type
  3. Open the working box for the law of sines or cosines steps

What the triangle calculator solves

A triangle calculator finds the three missing sides and angles from any three known parts, as long as at least one of them is a side. Type three of the six boxes and leave the others empty. Side a is opposite angle A, side b opposite B and side c opposite C, and angles are in degrees. The page opens with the three sides 7, 8 and 9: the angles are A = 48.19°, B = 58.412° and C = 73.398°, the area is 26.833 and the triangle is scalene and acute. It names the case it used: SSS, SAS, ASA, AAS or SSA.

How each case is solved

With three sides (SSS) the page uses the law of cosines, cos A = (b² + c² − a²) ÷ 2bc, for the angles. With two sides and the angle between them (SAS) it finds the third side from c² = a² + b² − 2ab cos C, then the angles. With two angles and any side (ASA or AAS) the third angle is 180° minus the two, and the law of sines, a ÷ sin A = b ÷ sin B = c ÷ sin C, gives the sides. The working box shows each line with your numbers. Three angles alone fix the shape but not the size, so the page asks for a side. Two angles that already add up to 180° or more give a message under those boxes.

The ambiguous case: two sides and an angle not between them

With two sides and an angle that is not between them (SSA), there can be zero, one or two triangles. Take a = 5, b = 7 and A = 40°. Then sin B = 7 × sin 40° ÷ 5 = 0.9, so B is either 64.145° or 180° − 64.145° = 115.855°. Both leave room for a third angle, so two triangles fit: one with c = 7.543 and one with c = 3.182. The page shows both, each with its own drawing. If sin B would be above 1, the side opposite the angle is too short to reach and no triangle exists. When the side opposite the angle is the longer of the two, only the first angle works.

Area, heights, drawing and limits

The area comes from Heron's formula, with s = (a + b + c) ÷ 2 and area = √(s(s − a)(s − b)(s − c)), written in an order that stays accurate for very thin triangles. The page also gives the perimeter, the height onto each side (2 × area ÷ side), the circumradius R = a ÷ 2 sin A and the inradius r = area ÷ s. The drawing is to scale and labels each vertex with its angle. Sides must be more than 0 and at most 1,000,000,000, and each angle less than 180°. The page needs exactly three values; with four or more filled it asks you to clear one. Results are rounded to the decimal places you choose, from 0 to 10.

Frequently asked questions

How do I solve a triangle when I know all three sides?

Type the sides and leave the angles empty. The page applies the law of cosines: cos A = (b² + c² − a²) ÷ 2bc. For 7, 8 and 9 it gives A = 48.19°, B = 58.412° and C = 73.398°, which add up to 180°. Sides that cannot close, such as 2, 3 and 6, give a message.

What is the ambiguous case of SSA?

When you know two sides and an angle opposite one of them, the other side can swing to two positions. For a = 5, b = 7 and A = 40° both B = 64.145° and B = 115.855° work, so the page shows two triangles with c = 7.543 and c = 3.182.

Can I solve a triangle from its three angles?

No. Three angles give only the shape: 60°, 60° and 60° fits an equilateral triangle of any size. Add one side, such as a = 10, and the page returns the other two sides and the area.

How do I find the area of a triangle from three sides?

Use Heron's formula. For sides 3, 4 and 5, s = 6 and the area is √(6 × 3 × 2 × 1) = 6. Enter the sides and the area appears next to the perimeter and the type, which here is right.

Which side is a and which angle is A?

Side a is the side opposite angle A, b is opposite B and c is opposite C. The letters are only names, so label your own triangle to match: call any side a and the angle across from it A, then fill the boxes with the same letters.

Are my numbers stored or sent anywhere?

No. The numbers are processed in your browser and are not uploaded. They are not stored on your device either, and reloading the page puts the 7, 8, 9 example back.