Skip to content

Triangle Solver

Enter any three parts of a triangle — three sides, two sides and an angle, or two angles and a side — and get the other three, the area, the perimeter, the circumradius and inradius, and a diagram drawn to scale. When two sides and a non-included angle allow two different triangles, both are solved. Free, no sign-up, and nothing leaves your browser.

Enter any three of the six parts — at least one of them a side — and leave the rest blank. Side a is opposite angle A, side b opposite B, side c opposite C.

Angle unit
Sides
Angles

Between 0 and 180 degrees.

Results

Case: SSA — two sides and an angle opposite one of them (law of sines; may be ambiguous)

The ambiguous case (SSA)

Height h = b sin A = 4, compared with side a

The height h is less than side {x}, which is less than the other known side, so the side can swing to two positions: two different triangles fit.

Blue marks the values you entered; orange marks the ones that were solved.

Triangle 1

5

Side a

8

Side b

9.9282

Side c

30°

Angle A

53.1301°

Angle B

96.8699°

Angle C

19.8564

Area

22.9282

Perimeter

5

Circumradius R

1.7321

Inradius r

This is a scalene, obtuse triangle.

sin B = b sin A / a = 8 × 0.5 / 5 = 0.8

The acute solution: B = 53.1301°

C = 180° − A − B = 96.8699°

c = a × sin C / sin A = 5 × 0.99282 / 0.5 = 9.9282

Area = ½ ab sin C = 19.8564

The triangle drawn to scale with its sides and angles labelled; entered values in blue and solved values in orangea = 5b = 8c = 9.928230°A53.1301°B96.8699°C

Triangle 2

5

Side a

8

Side b

3.9282

Side c

30°

Angle A

126.8699°

Angle B

23.1301°

Angle C

7.8564

Area

16.9282

Perimeter

5

Circumradius R

0.9282

Inradius r

This is a scalene, obtuse triangle.

sin B = b sin A / a = 8 × 0.5 / 5 = 0.8

The obtuse solution: B′ = 180° − B = 126.8699°

C = 180° − A − B′ = 23.1301°

c = a × sin C / sin A = 5 × 0.39282 / 0.5 = 3.9282

Area = ½ ab sin C = 7.8564

The triangle drawn to scale with its sides and angles labelled; entered values in blue and solved values in orangea = 5b = 8c = 3.928230°A126.8699°B23.1301°C

How to Use the Triangle Solver

  1. 1. Fill in three values. Side a is opposite angle A, side b opposite B, side c opposite C. Enter exactly three of the six, at least one of them a side, and leave the others blank. The Load an example menu fills in a typical case of each kind.
  2. 2. Pick degrees or radians. In radians you can type multiples of π, such as pi/3.
  3. 3. Read the solution. The solver names the case, shows the three missing parts, and writes out each formula with your numbers. If there are two triangles, both appear.
  4. 4. Check the diagram. The triangle is drawn to scale. Values you entered are blue and solved values are orange.

The Two Laws

LawFormulaUse it when
Law of sinesa / sin A = b / sin B = c / sin CYou know an angle and its opposite side
Law of cosinesc² = a² + b² − 2ab cos CYou know two sides and the angle between them, or all three sides
Angle sumA + B + C = 180°You know two angles
Area½ ab sin CYou know two sides and the included angle

The law of cosines also gives an angle from three sides: cos C = (a² + b² − c²) / (2ab).

The Five Cases

CaseYou knowMethodSolutions
SSSThree sidesLaw of cosines for two angles, then the angle sumOne, if the sides satisfy the triangle inequality
SASTwo sides and the angle between themLaw of cosines for the third side, then the anglesAlways one
ASATwo angles and the side between themAngle sum, then law of sinesOne, if the angles add to less than 180°
AASTwo angles and a side not between themAngle sum, then law of sinesOne, if the angles add to less than 180°
SSATwo sides and an angle opposite one of themLaw of sines for the other angleNone, one or two

The Ambiguous Case (SSA)

With two sides and a non-included angle the law of sines gives sin B, and sine takes the same value at an acute angle and its supplement, so both B and 180° − B may work. Let the known angle be A with opposite side a, and let b be the other known side. Compute the height h = b sin A. If A is acute, there is no triangle when a < h, exactly one right triangle when a = h, two triangles when h < a < b, and one triangle when a ≥ b. If A is obtuse or right, there is one triangle when a > b and none otherwise. The solver prints h and says which situation applies.

Worked Examples

  • SSS, sides 7, 8, 9. cos A = (64 + 81 − 49) / (2 × 8 × 9) = 96/144, so A ≈ 48.1897°; B ≈ 58.4119° and C ≈ 73.3985°. The area is about 26.8328.
  • SAS, b = 7, c = 10, A = 50°. a² = 49 + 100 − 140 cos 50°, so a ≈ 7.6818. Then B ≈ 44.2712°, C ≈ 85.7288°, and the area ½bc sin A ≈ 26.8116.
  • ASA, A = 40°, B = 60°, c = 10. C = 80°, and by the law of sines a ≈ 6.5270 and b ≈ 8.7939.
  • SSA, a = 5, b = 8, A = 30°. The height is h = 8 sin 30° = 4, and 4 < 5 < 8, so there are two triangles. Triangle 1: B ≈ 53.1301°, C ≈ 96.8699°, c ≈ 9.9282. Triangle 2: B ≈ 126.8699°, C ≈ 23.1301°, c ≈ 3.9282.
  • SSA, a = 3, b = 8, A = 30°. The height is 4 and 3 < 4, so side a cannot reach the base line: no triangle.

Frequently Asked Questions

What is the ambiguous case of the law of sines?
It is the SSA situation: two sides and an angle opposite one of them. Because sin B = sin(180° − B), the law of sines can return an acute and an obtuse angle for B, and depending on the numbers, zero, one or two triangles fit the data.
Can I solve a triangle with only three angles?
No. Three angles fix the shape of a triangle but not its size: every similar triangle has the same angles. You need at least one side to fix the scale, which is why the solver asks for one.
When do I use the law of sines and when the law of cosines?
Use the law of sines when you know an angle and its opposite side (ASA, AAS, SSA). Use the law of cosines when you know three sides, or two sides and the angle between them (SSS, SAS), because then no side-and-opposite-angle pair is available.
Why do I get "cannot form a triangle" for three sides?
Three lengths close into a triangle only when each is shorter than the sum of the other two. Sides 1, 2 and 3 fail this test: 1 + 2 equals 3, so the triangle would be flat, with a 180° angle.
How is the area calculated?
As ½ ab sin C — half the product of two sides and the sine of the angle between them — after all the parts are known. For a right triangle with legs 3 and 4 that gives 6, the same as ½ × base × height.
What are the circumradius and inradius?
The circumradius R is the radius of the circle through all three vertices, equal to a / (2 sin A). The inradius r is the radius of the largest circle inside the triangle, equal to the area divided by the semiperimeter, 2 × area / perimeter.

Related Tools

More in Math Calculators

See all Math Calculators