Triangle Calculator

Use this triangle calculator and triangle solver to recover missing sides and angles from a supported set of measurements. It solves planar SSS, SAS, ASA, AAS and SSA cases, returning area, perimeter and every resolved solution. Angle-only AAA input is checked separately and identified as insufficient to determine size rather than being assigned invented side lengths.

Method reviewed by the NumUtility editorial team · Updated October 26, 2026

Solve a triangle from its known sides and angles

Triangle ABC: side a opposite angle A, side b opposite angle B, side c opposite angle C. Not to scale.ABCabc
Lowercase sides are opposite matching uppercase angles. Schematic, not to scale.

Angles use degrees. Changing the case loads an example. Length units label unchanged numbers and do not convert them. AAA checks the angles but cannot determine size.

One nondegenerate triangle satisfies the selected measurements.

Solution 1

Area6 units²
Perimeter12 units
All sides and angles — solution 1
Opposite pairSide length (units)Angle (degrees)
a ↔ A336.8698976458
b ↔ B453.1301023542
c ↔ C590

Calculation steps

  1. Check all three strict triangle inequalities.
  2. Recover angles using the cosine rule and compute area with a stable form of Heron's formula.

Positive, planar, nondegenerate triangles only. Near-flat or numerically unresolved measurements are rejected. Results are rounded, not surveying or engineering specifications.

How to use this triangle calculator

Choose the known-measurement case, then enter the three labeled values. Lowercase a, b and c are opposite uppercase A, B and C. Angles are in degrees; all sides share the selected length unit. Changing case loads example measurements. Units label unchanged numbers rather than converting them. Side inputs range from 0.000001 to 1,000,000,000, and angles from 0.000001° to 179.999999°. Invalid entries hide results. Near-flat, extreme-ratio or numerically unresolved recovered triangles are rejected with a precision message rather than reported as dependable geometry.

How the calculation works

Start by matching the measurements to their positions in the triangle. SSS means all three sides are known. SAS means two sides and their included angle are known; in this interface those are b, c and angle A. ASA uses angles A and B with the included side c. AAS uses angles A and B with side a, which is opposite A. SSA uses sides a and b with the non-included angle A. These distinctions determine which equation is justified.

For three sides, first apply the strict triangle inequalities: a + b > c, a + c > b and b + c > a. Equality collapses the triangle into a line, so sides 1, 2 and 3 do not form a nondegenerate triangle. For valid sides 3, 4 and 5, the opposite angles are approximately 36.8698976458°, 53.1301023542° and 90°. Their sum is 180°. The area is 6 square units and the perimeter is 12 length units.

The cosine rule connects a side with the other two sides and the angle between them: a² = b² + c² − 2bc cos(A). In SAS mode, use the supplied included angle to recover a, then calculate the other angles from the completed side set. A numerically stable rearrangement avoids subtracting nearly equal squared quantities when possible. An angle between different sides cannot be substituted without relabeling the entire triangle consistently; doing so would solve a different geometric problem.

For ASA or AAS, recover C = 180° − A − B before calculating side lengths. If the two known angles total 180° or more, there is no positive third angle. Otherwise, use the sine rule a / sin(A) = b / sin(B) = c / sin(C), anchored by the supplied side. With A = 50°, B = 60° and c = 8, the third angle is 70° and the common scale is 8 / sin(70°). The side measurement supplies the size that angles alone cannot establish.

SSA requires extra care because the inverse sine initially supplies only one candidate angle B. A second candidate, 180° − B, can describe another valid triangle. The calculator tests both and retains only candidates with a positive third angle and supported numerical geometry. For a = 7, b = 10 and A = 30°, the sine ratio is 5 / 7. Two different B values leave positive C values, so both complete triangles are displayed. Choosing the first automatically would hide a real alternative.

Not every SSA case has two solutions. With a = 4, b = 10 and A = 30°, the required sine of B is 1.25, which is impossible. With a = 10, b = 7 and A = 30°, only one candidate leaves a positive C. The tangent case a = 5, b = 10 and A = 30° has B = 90° and one resolved triangle. Values indistinguishable from tangency at machine precision are merged and explained; tiny numerical differences are not presented as two reliably distinct measurements.

AAA measurements can establish a shape without establishing scale. Angles 50°, 60° and 70° describe an infinite family of similar triangles, so area, perimeter and side lengths remain undetermined. If the angles fail to total 180° within the stated computational check, the input is inconsistent instead. These are different conclusions: insufficient data need an additional side measurement, while inconsistent data need correction. Blank fields are also errors rather than an instruction to infer a missing zero or pick a convenient side.

Area is calculated from the completed sides using a stable rearrangement of Heron's formula. The mathematical expression is √[s(s − a)(s − b)(s − c)], with semiperimeter s = (a + b + c) / 2. The implementation scales the sides and rearranges the factors to reduce cancellation near a thin triangle. This improves arithmetic but cannot restore information lost in rounded measurements. The tool therefore rejects near-flat or excessively unequal configurations instead of guaranteeing that every mathematically possible extreme triangle is numerically resolvable.

Formulas

Angle sum

A + B + C = 180°

Law of sines

a / sin(A) = b / sin(B) = c / sin(C)

Law of cosines

a² = b² + c² − 2bc cos(A)

Area and perimeter

K = √[s(s − a)(s − b)(s − c)]; s = (a + b + c) / 2; P = 2s

Worked examples

A 3–4–5 triangle

SSS inputs a = 3, b = 4 and c = 5 produce C = 90°, area 6 and perimeter 12. The other angles total 90°; the sides all satisfy the strict triangle inequalities.

Two SSA solutions

For a = 7, b = 10 and A = 30°, B is approximately 45.5846914028° or 134.415308597°. The corresponding C values are approximately 104.415308597° and 15.5846914028°. Both candidates have positive angles and must be retained.

Common uses

Check a geometry solution

Compare a hand-worked sine or cosine rule calculation with the recovered side-angle pairs. Keep the chosen input case and all solution branches with the answer.

Review ambiguous measurements

Identify whether a non-included angle and two sides specify zero, one or two triangles before selecting dimensions for a drawing or classroom exercise.

Choose the correct area workflow

Recover the necessary dimensions before calculating area. Use the Area Calculator directly when base and perpendicular height are already known.

Accuracy and limitations

Educational planar geometry only. Side inputs use one shared unit, angles use degrees, and the selected unit does not convert existing values. Displayed results use up to twelve significant digits.

Floating-point arithmetic cannot reliably resolve every extreme configuration. A normalized shortest-side ratio below 1e-10, triangle-inequality margin at or below 1e-12, or recovered angle below 0.000001° triggers a precision error. These are numerical guardrails, not physical measurement tolerances.

Sources and methodology

These primary references explain the numerical methods and units used here. Review the calculation assumptions and limitations alongside the result.

Frequently asked questions

Why can SSA have two answers?

A sine value can correspond to supplementary angles B and 180° − B. If both leave a positive C, two different triangles fit the same supplied SSA measurements.

Can three angles determine the sides?

No. Valid AAA data fix a similarity class, not scale. Supply a side in ASA or AAS mode to determine lengths and area.

Can I enter radians?

No. This interface uses degrees. Convert the supplied angles to degrees before entry.

Does an impossible case return zero area?

No. Impossible cases are labeled no solution. Zero area would describe a degenerate shape, not a valid solved triangle.

Why might a very thin triangle be rejected?

Near-flat or extreme-ratio data may not resolve reliably with floating-point arithmetic and rounded measurements. A precision error is safer than false certainty.

Are my measurements sent to the server?

No. Interactive calculations run locally in your browser without submitting the entered measurements to NumUtility.

Related calculators

Related guides