Triangle Solver: Sine Rule and Cosine Rule (SSS, SAS, ASA, AAS, SSA)

Solve any triangle, not only a right triangle, from three known parts. The ambiguous SSA case shows both possible triangles.

Calculated from standard textbook formulas, with every step shown. The formulas are fixed, so the working does not need checking: what matters is the numbers you type in. Use these calculators only if you are competent to choose the inputs (loads, material strength, dimensions, supports) and check your units and assumptions. For learning and checking your own working: design and sign-off are for a qualified engineer. Drafting Central does not store the numbers you type.

How this calculator works

A triangle is fixed by three suitable measurements. With three sides (SSS) or two sides and the angle between them (SAS), the cosine rule gives the missing side or angles. With two angles and any side (ASA or AAS), the third angle is 180 degrees minus the other two and the sine rule gives the remaining sides.

The case that catches people out is two sides and an angle that is not between them (SSA). Depending on the numbers there can be no triangle, one triangle, or two different triangles. The calculator tells you which, and shows both answers when there are two. Side a is always opposite angle A, side b opposite B and side c opposite C.

Formulas used

  • \frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C} = 2R
  • c^2 = a^2 + b^2 - 2ab\cos C
  • K = \tfrac{1}{2} a b \sin C

Worked example

With the default numbers in the calculator above:

  1. Angle A: 48.19°
  2. Angle B: 58.412°
  3. Angle C: 73.398°
  4. Side a: 7
  5. Side b: 8
  6. Side c: 9
  7. Area: 26.833
  8. Perimeter: 24
  9. Circumradius R: 4.6957
  10. Inradius r: 2.2361
  11. Sine rule check: 9.3915 = 9.3915 = 9.3915

Change the numbers in the calculator to see the full working, every step, for your own case.

Common questions

Which rule do I use?

The cosine rule when you know three sides, or two sides and the angle between them. The sine rule when you know a side and its opposite angle plus one more angle or side.

Why does SSA sometimes give two answers?

The known side opposite the known angle can swing to two positions and still meet the other side, when it is shorter than the other known side but longer than the other side times the sine of the angle. Both triangles satisfy the given numbers.

Why does it say these lengths cannot make a triangle?

Each side has to be shorter than the other two added together. If one side is as long as or longer than the other two combined, the sides cannot close.

What are the circumradius and inradius?

The circumradius is the radius of the circle through all three corners, and the inradius is the radius of the largest circle that fits inside the triangle.

Related calculators

Further reading: Standard engineering mathematics texts (sine rule, cosine rule and the ambiguous case).

Need a calculator we do not have?

Tell us what you would like to calculate. We read every request and build the most asked-for ones.

We store your request (and your email if you give it) to decide what to build. We do not store the numbers you type into calculators.

Embed this calculator on your own page

Copy this code into your page. The calculator runs inside the frame and links back to Drafting Central.

Need this drawn, designed or checked?

Drafting Central is a mechanical engineering and drafting business in Burleigh Waters on the Gold Coast. A calculator gives you the numbers; we can turn them into drawings and designs.

Need help with a real project?

Talk to Drafting Central →

← All engineering calculators