Math

Triangle Calculator

Choose the sides and angles you know. Solve a planar triangle, including both valid solutions when side-side-angle measurements are ambiguous.

Free to useNo sign-upCalculated in your browser

Known measurements

Side a is opposite angle A, b opposite B and c opposite C. Angles are degrees. Use one length unit throughout.

units

0.000001–1000000000; up to 6 decimals.

units

0.000001–1000000000; up to 6 decimals.

units

0.000001–1000000000; up to 6 decimals.

Your measurements stay in this browser.

Triangle solutions

Choose a case and calculate. SSA may have two triangles or no valid triangle; uncertain near-degenerate cases give an explicit error.

Start with the measurements you actually know

This calculator solves planar triangles. Side a is opposite angle A, side b opposite B, and side c opposite C. Angles are in degrees; all lengths use one common unit. Choosing a unit changes the label, not the measurement. Convert units separately before mixing them.

Choose SSS for three sides; SAS for sides b and c and the angle A between them; or ASA/AAS for angles A and B plus whichever side is known. The third angle is then 180° minus A and B. SSA uses side a, side b and the angle A opposite a. Only the active fields constrain the calculation, so hidden fields are not silently treated as additional measurements.

Sine law, cosine law and area

The NIST DLMF planar-triangle reference gives the sine law a / sin A = b / sin B = c / sin C, the cosine law a² = b² + c² − 2bc cos A, and area identities. With semiperimeter s = (a+b+c)/2, Heron’s formula is area = √(s(s−a)(s−b)(s−c)). Area also equals bc sin A / 2.

For the default sides 3, 4 and 5, perimeter is 12, area 6 square units, and angles are approximately 36.869898°, 53.130102° and 90°. The triangle is right and scalene. A separate equilateral example with all sides 6 has perimeter 18, three 60° angles and area 9√3 ≈ 15.588457 square units.

For a known base and perpendicular height rather than general side/angle solving, use Area. For calculations involving a line through two coordinates, use Slope.

Why SSA can produce two triangles

With a = 3, b = 4 and A = 30°, the sine law gives sin B = 4 × sin 30° / 3 = 2/3. Both approximately 41.810315° and its supplement 138.189685° can be B. The corresponding C values are approximately 108.189685° and 11.810315°. Both are positive, so the calculator shows two complete solutions, not one arbitrarily chosen answer.

Some SSA inputs have one valid triangle or none. For a = 2, b = 4, A = 30°, the certified tangent case has B = 90° and C = 60°. For a = 1, b = 4, A = 30°, the sine-law ratio exceeds one and no triangle exists.

Boundaries and approximate results

Lengths accept 0.000001–1000000000 and angles 0.000001–179.999999°, with at most six decimal places. All three strict triangle inequalities must hold. Zero-length, degenerate or inconsistent active inputs are errors. The engine verifies finite positive results, angle totals and sine/cosine-law residuals before displaying a solution.

SSS uses exact input integers for inequalities, the Heron radicand and squared-side comparisons. Other cases use stable trigonometric formulas. Very near a zero-angle boundary, or within 10^−10 of an uncertified SSA tangent ratio, the tool rejects the case rather than suggesting a trustworthy solution count. The minimum returned angle is 0.000001°. Derived sides must remain within the supported length range.

Results display eight significant digits, sometimes in scientific notation. Rounded angles may not sum to exactly 180°. SSS classifications use the entered exact sides; derived classifications use a relative 10^−10 side tolerance and 10^−8 degree right-angle tolerance. Such classifications are labeled approximate when equality or a right angle is inferred within that tolerance.

Use Scientific for individual trigonometric expressions and Fraction for exact rational arithmetic. This tool models flat geometry, not spherical navigation or a structural design assessment.

Sources & review

Last reviewed: . The formula is reproduced above so you can check the math independently.

How we check calculations and describe their limits

Accessibility and student privacy

Our accessibility target is WCAG 2.1 AA. We use automated checks for keyboard operation, narrow layouts and readable alternatives to charts. Keyboard and screen reader behavior can vary by device and browser.Report an accessibility issue.

These tools have no ads, affiliate offers or sponsored content. No account is needed. Calculations run in your browser; your inputs and results are not sent to us or to analytics. Google Analytics may be used to measure site usage. See Privacy & analytics for details and how to turn it off.