About the Triangle Calculator

Solves any triangle from 3 known sides or angles, handling all five classic trigonometry cases including the ambiguous SSA case.

What it is

Enter any 3 of a triangle's 6 values (sides a, b, c and angles A, B, C) and the calculator automatically detects which case applies — SSS, SAS, ASA, AAS, or SSA — and solves for the rest using the Law of Cosines and Law of Sines.

Supported cases

SSS

Three sides known — solved via the Law of Cosines.

SAS

Two sides and the included angle — solved via the Law of Cosines.

ASA / AAS

Two angles and a side — solved via the Law of Sines.

SSA (ambiguous)

Two sides and a non-included angle — can yield 0, 1, or 2 valid triangles, all shown.

Ambiguous case handling

The SSA case is famous for producing zero, one, or two valid triangles depending on the numbers — the "swinging side" can meet the base at two different points. The calculator checks the sine value produced by the Law of Sines: if it exceeds 1, no triangle exists; if it equals 1, exactly one right-angled solution exists; otherwise both candidate angles are checked for validity and both are shown when valid.

Diagram and validation

A scaled SVG diagram is drawn from the solved side lengths and angles. Inputs that violate the triangle inequality (SSS) or produce an angle sum ≥ 180° (ASA/AAS) are rejected with a plain-English explanation rather than a silent wrong answer or NaN.

Types of triangles (by side length)

Triangles are classified by their side lengths into three main types: equilateral, isosceles, and scalene.

Equilateral

All three sides are equal in length, and all three interior angles are equal, measuring 60° each. Example: a = b = c = 5, A = B = C = 60°.

Isosceles

Exactly two sides are equal in length. The angles opposite the equal sides are also equal to each other. Example: a = b = 5, c = 8 gives A = B ≈ 36.9°.

Scalene

All three sides have different lengths, and all three interior angles have different measures. Example: a = 4, b = 5, c = 6.

Formula for a missing side given two sides

If you know two sides and the angle between them (SAS), the third side is found with the Law of Cosines:

c² = a² + b² − 2ab·cos(C)

where C is the angle included between sides a and b. If the triangle is a right triangle (C = 90°), this simplifies to the familiar Pythagorean theorem, since cos(90°) = 0:

c² = a² + b²

If instead you know two sides and a non-included angle (SSA), use the Law of Sines to find the missing angle first, then solve for the remaining side — this is the ambiguous case described above.

Ready to solve a triangle?

Free, no sign-up required.

Open the Triangle Calculator