Triangle Solver Calculator: Law of Sines & Cosines

Solve SSS, SAS, ASA/AAS, and SSA triangles from known sides and angles. Use auto-detect or choose the case, enter degrees or radians such as pi/2, and get the full triangle with steps.

Case, Diagram & Inputs

2 dp
Auto-detect accepts any valid SSS, SAS, ASA/AAS, or SSA pattern.
Opposite angle A
Opposite side a
Opposite angle B
Opposite side b
Opposite angle C
Opposite side c

Opposite pairs matter: side a is opposite angle A, side b is opposite B, and side c is opposite C.

Results

Steps

Advertisement

How This Triangle Solver Calculator Works

This triangle solver calculator helps you solve a triangle when you know some sides and angles but not all. Choose SSS, SAS, ASA/AAS, SSA, or Auto-detect, then enter the values you have to get missing sides, missing angles, perimeter, semiperimeter, area, triangle type, inradius, and circumradius.

The calculator is built around the two core rules of trigonometry: the Law of Sines and the Law of Cosines. These formulas connect side lengths and angles, letting you “solve” the triangle once enough information is known. The tool also uses the triangle angle sum (A + B + C = 180°) to fill in the final angle, and it computes area using Heron’s formula or the sine area formula when appropriate.

How to use the solver:

  1. Select the known-value case or keep Auto-detect.
  2. Enter any valid three values with at least one side. Remember that side a is opposite angle A, and so on.
  3. Make sure your angle unit matches your inputs. In radians mode, expressions such as pi/2, pi/4, and 2*pi/3 are accepted.
  4. Click Calculate to see all missing sides and angles, plus a step-by-step breakdown.
  5. Review the results and the triangle diagram to confirm everything looks reasonable.

If you enter an SSA case (two sides and a non-included angle), the tool automatically checks for the ambiguous case and shows zero, one, or two valid triangles. This is a common point of confusion in trigonometry classes, and seeing both solutions helps build intuition about when multiple triangles are possible.

Common real-world uses include estimating roof pitches, checking the dimensions of a triangular truss, verifying a survey measurement, or solving geometry problems in physics and engineering. It can also serve as a triangle side calculator or triangle angle calculator when you are double-checking work by hand. For learners, the visible formulas and steps make it easier to understand why the answer is correct, not just what the answer is.

Quick reference formulas:

  • Law of Cosines: a² = b² + c² − 2bc·cos(A)
  • Law of Sines: a/sin(A) = b/sin(B) = c/sin(C)
  • Area: Area = ½ab·sin(C) or Area = √(s(s−a)(s−b)(s−c)) with s=(a+b+c)/2

Methodology & Trust Details

Formulas used

The solver uses the Law of Cosines for SSS and SAS, the Law of Sines for ASA/AAS and SSA, the angle-sum rule, Heron's formula, r = area / s, and R = abc / (4 * area).

Privacy

All calculations run client-side in your browser. Values are not uploaded to a server by this calculator.

Rounding

The precision slider changes displayed rounding. Internal calculations use JavaScript floating-point numbers, so very tiny rounding differences can appear near boundary cases.

Limitations

The diagram is a responsive visual preview and may be illustrative rather than drawn exactly to scale. The numeric table is the source of truth.

Solved Examples

SSS

Inputs: a=7, b=8, c=9. Use Law of Cosines to find each angle. Final answer: A≈51.32°, B≈60.00°, C≈68.68°, area ≈26.83.

Three sides

SAS

Inputs: a=5, b=7, C=60°. Use Law of Cosines to get c=sqrt(a²+b²-2ab cos C). Final answer: c≈6.24, A≈43.90°, B≈76.10°.

Included angle

ASA/AAS

Inputs: A=50°, B=60°, a=10. First compute C=70°, then use Law of Sines. Final answer: b≈11.31, c≈12.27.

Two angles

SSA ambiguous case

Inputs: A=30°, a=5, b=8. The height is 8 sin 30° = 4, and 4 < 5 < 8, so two triangles are possible.

Two solutions

SSA no solution

Inputs: A=30°, a=2, b=6. The height is 6 sin 30° = 3. Since a < h, the known side cannot reach the base line, so no valid triangle exists.

Height test

Triangle Solver: FAQs

Which inputs are valid?

Any three values with at least one side (SSS, SAS, ASA, AAS, or SSA). Three angles alone are insufficient.

When do I use Law of Sines vs Law of Cosines?

Use Law of Cosines for SSS and SAS. Use Law of Sines when you have or can create a known opposite side-angle pair, which is typical for ASA, AAS, and SSA.

Why can't AAA solve a triangle?

AAA gives only the shape. Without a side length, there are infinitely many similar triangles at different sizes.

What is the SSA ambiguous case?

With two sides and a non-included angle, there may be two, one, or no triangles. The solver detects and shows all valid outcomes.

How do I know if there are two SSA triangles?

For an acute known angle, compute the height from the adjacent known side. If the opposite known side is greater than the height but shorter than the adjacent known side, two triangles are possible.

Can I enter pi/2 radians?

Yes. Switch to radians and enter expressions such as pi/2, pi/4, 2*pi/3, or decimal radians.

What does no valid triangle mean?

It means the numbers cannot form a triangle. Common causes include sides that fail the triangle inequality, angle totals that leave no positive third angle, or SSA values where the opposite side is shorter than the height.

Is the diagram drawn to scale?

The diagram is an illustrative preview with the solved labels. Use the numeric result table for exact values.

Can I work in radians?

Yes. Toggle Degrees/Radians. Inputs and outputs update immediately, and radians mode supports pi-style notation.

Is this private?

Yes. Everything runs locally; nothing is uploaded.

Explore more tools