Triangle Side Calculator

Missing sides and angles from SSS, SAS, ASA, AAS or SSA โ€” with the right rule chosen for you
a = 7, b = 9, angle C = 52 degrees โ€” find c
A = 41 degrees, B = 76 degrees, a = 12 โ€” find b and c
a = 8, b = 11, A = 32 degrees โ€” solve the triangle
Legs 9 and 12 โ€” find the hypotenuse

Pick the Rule From What You Are Given

Label each angle with a capital letter and the side opposite it with the matching lowercase letter. Then the given information decides the method:

GivenUse
Two legs, or a leg and the hypotenuse of a right trianglePythagorean theorem
SSS (three sides)Law of cosines, rearranged for an angle
SAS (two sides, included angle)Law of cosines
ASA or AASAngles sum to 180ยฐ180ยฐ, then law of sines
SSA (two sides, non-included angle)Law of sines โ€” ambiguous, check for two solutions
AAAShape only; sides are not determined

Existence conditions. Angles must sum to exactly 180ยฐ180ยฐ, and every side must satisfy the triangle inequality: a+b>ca + b > c for all three pairings. If a computed side or angle violates either, no such triangle exists โ€” a valid answer, not a mistake.

The Two Laws

Law of cosines โ€” works for every triangle and reduces to Pythagoras when C=90ยฐC = 90ยฐ:

c2=a2+b2โˆ’2abcosโกCโŸบcosโกC=a2+b2โˆ’c22abc^2 = a^2 + b^2 - 2ab\cos C \qquad \Longleftrightarrow \qquad \cos C = \frac{a^2 + b^2 - c^2}{2ab}

The rearranged form is safe for finding angles because arccosโก\arccos returns values across the full 0ยฐ0ยฐ to 180ยฐ180ยฐ range, so an obtuse angle comes out correctly signed.

Law of sines โ€” needs a complete sideโ€“angle pair:

asinโกA=bsinโกB=csinโกC\frac{a}{\sin A} = \frac{b}{\sin B} = \frac{c}{\sin C}

The ambiguous case. Given SSA, arcsinโก\arcsin only ever returns an acute angle, but sinโกฮธ=sinโก(180ยฐโˆ’ฮธ)\sin\theta = \sin(180ยฐ - \theta). So after computing BB, also test Bโ€ฒ=180ยฐโˆ’BB' = 180ยฐ - B: if A+Bโ€ฒ<180ยฐA + B' < 180ยฐ, a second valid triangle exists and both must be reported. When sinโกB>1\sin B > 1, no triangle exists.

Safe habit: solve for the largest unknown angle with the law of cosines, then use the law of sines for the rest โ€” that avoids the ambiguity entirely.

Common Mistakes to Avoid

  • Reporting one answer in the SSA case. Always test the obtuse partner 180ยฐโˆ’B180ยฐ - B before deciding.
  • Calculator in the wrong mode. Degrees and radians produce completely different sides; cosโก52โ‰ˆ0.616\cos 52 \approx 0.616 in degrees but โ‰ˆ0.469\approx 0.469 in radians.
  • Misusing the law of cosines as c2=a2+b2โˆ’2abcosโกCc^2 = a^2 + b^2 - 2ab\cos C with the wrong angle. CC must be the angle between aa and bb.
  • Applying Pythagoras to a non-right triangle. It is only the C=90ยฐC = 90ยฐ special case of the law of cosines.
  • Rounding intermediates. Carry full precision and round once at the end; rounding cosโก52ยฐ\cos 52ยฐ to 0.620.62 shifts cc in the second decimal.
  • Pairing a side with the wrong angle. In the law of sines, aa must be opposite AA.

Examples

Step 1: Two sides and the included angle, so use the law of cosines
Step 2: c2=72+92โˆ’2(7)(9)cosโก52ยฐc^2 = 7^2 + 9^2 - 2(7)(9)\cos 52ยฐ
Step 3: =49+81โˆ’126cosโก52ยฐ= 49 + 81 - 126\cos 52ยฐ
Step 4: cosโก52ยฐ=0.615661\cos 52ยฐ = 0.615661, so 126ร—0.615661=77.5733126 \times 0.615661 = 77.5733
Step 5: c2=130โˆ’77.5733=52.4267c^2 = 130 - 77.5733 = 52.4267
Step 6: c=52.4267=7.2406c = \sqrt{52.4267} = 7.2406
Answer: cโ‰ˆ7.24c \approx 7.24

Step 1: Third angle: C=180ยฐโˆ’41ยฐโˆ’76ยฐ=63ยฐC = 180ยฐ - 41ยฐ - 76ยฐ = 63ยฐ
Step 2: Law of sines: b=asinโกBsinโกA=12sinโก76ยฐsinโก41ยฐb = \dfrac{a\sin B}{\sin A} = \dfrac{12\sin 76ยฐ}{\sin 41ยฐ}
Step 3: =12(0.970296)0.656059=11.64360.656059=17.7477= \dfrac{12(0.970296)}{0.656059} = \dfrac{11.6436}{0.656059} = 17.7477
Step 4: c=12sinโก63ยฐsinโก41ยฐ=12(0.891007)0.656059=10.69210.656059=16.2974c = \dfrac{12\sin 63ยฐ}{\sin 41ยฐ} = \dfrac{12(0.891007)}{0.656059} = \dfrac{10.6921}{0.656059} = 16.2974
Answer: bโ‰ˆ17.75b \approx 17.75, cโ‰ˆ16.30c \approx 16.30, C=63ยฐC = 63ยฐ

Step 1: sinโกB=bsinโกAa=11sinโก32ยฐ8=11(0.529919)8=0.728639\sin B = \dfrac{b\sin A}{a} = \dfrac{11\sin 32ยฐ}{8} = \dfrac{11(0.529919)}{8} = 0.728639
Step 2: B1=arcsinโก(0.728639)=46.77ยฐB_1 = \arcsin(0.728639) = 46.77ยฐ
Step 3: Test the obtuse partner: B2=180ยฐโˆ’46.77ยฐ=133.23ยฐB_2 = 180ยฐ - 46.77ยฐ = 133.23ยฐ, and 32ยฐ+133.23ยฐ=165.23ยฐ<180ยฐ32ยฐ + 133.23ยฐ = 165.23ยฐ < 180ยฐ โ€” so it is valid too
Step 4: Triangle 1: C=180ยฐโˆ’32ยฐโˆ’46.77ยฐ=101.23ยฐC = 180ยฐ - 32ยฐ - 46.77ยฐ = 101.23ยฐ, c=8sinโก101.23ยฐsinโก32ยฐ=14.81c = \dfrac{8\sin 101.23ยฐ}{\sin 32ยฐ} = 14.81
Step 5: Triangle 2: C=180ยฐโˆ’32ยฐโˆ’133.23ยฐ=14.77ยฐC = 180ยฐ - 32ยฐ - 133.23ยฐ = 14.77ยฐ, c=8sinโก14.77ยฐsinโก32ยฐ=3.85c = \dfrac{8\sin 14.77ยฐ}{\sin 32ยฐ} = 3.85
Answer: Two triangles: B=46.77ยฐ,โ€‰C=101.23ยฐ,โ€‰cโ‰ˆ14.81B = 46.77ยฐ,\, C = 101.23ยฐ,\, c \approx 14.81; or B=133.23ยฐ,โ€‰C=14.77ยฐ,โ€‰cโ‰ˆ3.85B = 133.23ยฐ,\, C = 14.77ยฐ,\, c \approx 3.85

Frequently Asked Questions

If you know the angle between the two known sides, use the law of cosines: c^2 = a^2 + b^2 - 2ab cos C. If instead you know an angle opposite a known side, find the remaining angles first and use the law of sines.

Only in the SSA case โ€” two sides and an angle not between them. Because sin B equals sin(180 - B), the arcsine result and its obtuse partner can both give valid triangles. Check whether A plus the obtuse partner is still under 180 degrees.

No. The triangle inequality requires the sum of any two sides to exceed the third. Lengths of 2, 3 and 9 fail because 2 + 3 is less than 9, so no triangle exists.

Prefer the law of cosines rearranged as cos C = (a^2 + b^2 - c^2)/(2ab). Its arccosine covers 0 to 180 degrees, so obtuse angles come out correctly, whereas arcsine in the law of sines only ever returns an acute value.

Related Solvers

Related Guides

Try AI-Math for Free

Get step-by-step solutions to any math problem. Upload a photo or type your question.

Start Solving