Skip to main content

Triangle Calculator

Use this triangle calculator to find missing sides and angles from the measurements you know. Choose a solving case, enter each value with its unit, and read every valid triangle, including both possible SSA solutions.

Choose the measurements you know

Match lowercase side a with opposite angle A, side b with B, and side c with C. In the default SAS case, C is the angle between a and b. The reference diagram shows those labels and is not to scale. Choose a different case when your known measurements occupy different positions.

Choose by the position of the given side or angle, not just by how many values appear in the problem.

Match the given measurements to a solving case
Known measurementsCasePossible solutionsWhat sets the size?
Sides a, b and cSSSOne if the sides form a nondegenerate triangleThe given sides
Sides a and b; angle C between themSASOne for valid positive sides and an interior angleThe given sides
Angles A and B; side c between their verticesASAOne when the angles leave a positive remaining angleSide c
Angles A and B; side a opposite AAASOne when the angles leave a positive remaining angleSide a
Sides a and b; angle A opposite aSSANone, one or twoThe given sides
A right angle plus two legs, or a hypotenuse and leg, or a side and acute angleRight triangleOne for a valid selected pairThe given side or sides
Angles A and B onlyTwo angles onlyA remaining angle; infinitely many similar trianglesNo length is given

OpenStax, Law of Sines and Law of Cosines, establish these cases. An impossible set is rejected. Angles alone do not determine side lengths, area, perimeter or heights.

Select the case first

The visible fields change with the known measurements. Use the example button to load a complete case, or enter your own values. Open Calculation details for working and derived measurements.

Keep units beside values

Choose each side’s length unit and each angle’s degree or unit. More options contains the result length unit. A right triangle always labels the hypotenuse c.

Check a triangle calculation step by step

Choose SAS. Enter a = 1 , b = 1 and included C = 60°.

Convert the angle: 60 deg ≈ 1.047197551 rad.

Use the stable cosine law: c = √(( 1 − 1 )² + 4 × 1 × 1 × sin²(1.047197551/2)) ≈ 1 . The displayed substitution is rounded; the calculation uses the unrounded angle.

The result is equilateral: a ≈ 1 , b ≈ 1 , c ≈ 1 . Angles A, B and C each display ≈ 60° (1.047197551 rad).

Area ≈ 0.4330127019 ; perimeter ≈ 3 . Open the working to check the entered units and the rule used.

Which rule solves your triangle?

The Law of Cosines is c² = a² + b² − 2ab cos(C). It solves SAS because C is between a and b. Rearranging gives cos(C) = (a² + b² − c²)/(2ab) for SSS; repeat for the other angles. OpenStax, Algebra and Trigonometry, Law of Cosines derives the relationship.

The Law of Sines is a/sin(A) = b/sin(B) = c/sin(C). For ASA or AAS, first find C = 180° − A − B, then use the known side and its opposite angle to set the common ratio. OpenStax, Algebra and Trigonometry, Law of Sines explains these cases. Relabel the whole triangle consistently if your problem uses different letters.

The calculator uses equivalent stable formulas internally. For SAS it evaluates c = √((a − b)² + 4ab sin²(C/2)); for SSS it uses half-angle relationships and factored area expressions. W. Kahan, Miscalculating Area and Angles of a Needle-like Triangle explains why direct subtraction can lose information in a very narrow triangle.

When SSA gives two triangles

SSA gives an angle opposite a known side. It does not give the angle between the two known sides. The sine law gives sin(B) = b sin(A)/a. A principal inverse-sine answer can have a supplementary partner, B_other = 180° − B. Keep each candidate only if it leaves a positive C and positive side lengths. OpenStax, Algebra and Trigonometry, Law of Sines describes the ambiguous case.

Enter a = 6 , b = 8 and A = 35°. The calculator finds both triangles. In the first, B ≈ 49.88640842° (0.8706820789 rad) and c ≈ 10.41904674 . In the other, B ≈ 130.1135916° (2.270910575 rad) and c ≈ 2.687385967 . Each has its own area, perimeter and heights. Keep the labelled results together; the same givens do not select just one of them.

If a is shorter than b sin(A), there is no triangle. Other candidates can fail because they leave no positive remaining angle or side. A near-tangent case that the arithmetic cannot resolve is reported as a precision problem, not silently reduced to one solution.

Solve a right triangle from two measurements

Right triangle mode fixes C = 90° and c as the hypotenuse, the side opposite the right angle. Choose the known pair before entering values. The supported pairs are both legs, hypotenuse and leg a, hypotenuse and acute A, or leg a and its opposite acute A.

Use c² = a² + b² for two sides. With an acute angle, a = c sin(A) and b = c cos(A). These right-triangle relationships underlie the derivations in OpenStax, Algebra and Trigonometry, Law of Sines and OpenStax, Algebra and Trigonometry, Law of Cosines. For legs a = 3 and b = 4 , c ≈ 5 .

Special-angle triangles use the same modes. With hypotenuse c = 2 and A = 30°, a ≈ 1 and b ≈ 1.732050808 . With equal legs a = b = 1 , A ≈ 45° (0.7853981634 rad) and c ≈ 1.414213562 . The tool gives decimal approximations, not symbolic radicals.

Coordinate differences form the perpendicular legs used by the distance formula. When your givens are Cartesian point pairs, the Coordinate Distance Calculator finds the segment length and midpoint directly.

Read area, perimeter and heights

Each solved triangle includes its side lengths, angles, area, perimeter and the height to each side. Perimeter is a + b + c. Area K = ab sin(C)/2, and height to side a is h_a = 2K/a; use the corresponding side for h_b or h_c. A height is perpendicular to its base line and may meet an extension of that line in an obtuse triangle. OpenStax, Algebra and Trigonometry, Law of Sines derives the sine-area relationship.

For SSS, Heron’s formula uses s = (a + b + c)/2 and K = √(s(s − a)(s − b)(s − c)), as given by OpenStax, Algebra and Trigonometry, Law of Cosines. The calculator evaluates a factored equivalent to preserve small positive areas. In the worked SAS example, area ≈ 0.4330127019 , perimeter ≈ 3 , and each height ≈ 0.8660254038 .

Each input side has its own unit selector. Result length units also determine the squared area unit. Degrees and can be entered separately for each angle; results show both. The exact relationship is 180° = π , from NIST SP 330, section 4. The length selectors use the exact definitions in NIST SP 811, Appendix B.9 and NIST Metric SI prefixes.

If you already know a triangle’s base and perpendicular height and only need its planar area, the Square Footage Calculator accepts those dimensions. If every boundary length is already known, the Perimeter Calculator adds that boundary without solving missing angles.

When measurements do not determine a triangle

Angles determine shape but not size. Two angles only mode finds the remaining angle and reports that a side length is needed. Supplying all the angles would still leave infinitely many similar triangles. An additional area or side-difference constraint can supply information in a geometry problem, but this calculator does not accept those reverse inputs. OpenStax, Algebra and Trigonometry, Law of Sines requires a side measurement for a full numerical solve.

Sides must be positive and obey the strict triangle inequality. The longest side must be shorter than the sum of the others. Equality gives a flat, degenerate figure. Interior angles must be positive and below 180°; a supplied pair must sum to less than 180°. A right-mode acute angle must also be below 90°, and its hypotenuse must exceed either leg.

Enter finite decimals or scientific notation. Fractions, expressions and radical notation are unsupported. Calculator Campus accepts up to 15 significant digits and 64 characters per measurement. After conversion, input sides must lie between 1e-100 and 1e100 . These are software limits, not measurement-accuracy guarantees.

All modes display approximate results with up to 10 significant digits. Small nonzero values use scientific notation. Copy uses the same displayed precision, and intermediate calculations do not use rounded display values. Rounded angles may not visibly sum to an exact half-turn. Values too close to a degenerate or unresolved boundary are rejected. This includes angles too small to represent reliably after conversion and angles whose degree display would round to a straight angle. W. Kahan, Miscalculating Area and Angles of a Needle-like Triangle discusses the numerical sensitivity of narrow triangles.

The reference diagram is labelled Not to scale. It teaches which side faces each angle; its shape is not computed from your measurements. The calculator solves plane Euclidean triangles, not spherical geometry, general trigonometric equations or congruence proofs.

When you know only a polygon side count, the Polygon Angle Calculator finds its interior angle sum or its regular angles. Those relationships do not supply the measured sides or angles needed to solve a general triangle.

References

(6)
  1. OpenStax, Algebra and Trigonometry, Law of Sines

    OpenStax via Mathematics LibreTexts · accessed 2026-11-16

  2. OpenStax, Algebra and Trigonometry, Law of Cosines

    OpenStax via Mathematics LibreTexts · accessed 2026-11-16

  3. NIST SP 330, section 4

    NIST · accessed 2026-11-16

  4. NIST SP 811, Appendix B.9

    NIST · accessed 2026-11-16

  5. NIST Metric SI prefixes

    NIST · accessed 2026-11-16

  6. W. Kahan, Miscalculating Area and Angles of a Needle-like Triangle

    W. Kahan, University of California, Berkeley · accessed 2026-11-16