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+b22abcosCcosC=a2+b2c22abc^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° to 180°180° range, so an obtuse angle comes out correctly signed.

Law of sines — needs a complete side–angle pair:

asinA=bsinB=csinC\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 sinB>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; cos520.616\cos 52 \approx 0.616 in degrees but 0.469\approx 0.469 in radians.
  • Misusing the law of cosines as c2=a2+b22abcosCc^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 cos52°\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+922(7)(9)cos52°c^2 = 7^2 + 9^2 - 2(7)(9)\cos 52°
Step 3: =49+81126cos52°= 49 + 81 - 126\cos 52°
Step 4: cos52°=0.615661\cos 52° = 0.615661, so 126×0.615661=77.5733126 \times 0.615661 = 77.5733
Step 5: c2=13077.5733=52.4267c^2 = 130 - 77.5733 = 52.4267
Step 6: c=52.4267=7.2406c = \sqrt{52.4267} = 7.2406
Answer: c7.24c \approx 7.24

Step 1: Third angle: C=180°41°76°=63°C = 180° - 41° - 76° = 63°
Step 2: Law of sines: b=asinBsinA=12sin76°sin41°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=12sin63°sin41°=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: b17.75b \approx 17.75, c16.30c \approx 16.30, C=63°C = 63°

Step 1: sinB=bsinAa=11sin32°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=8sin101.23°sin32°=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=8sin14.77°sin32°=3.85c = \dfrac{8\sin 14.77°}{\sin 32°} = 3.85
Answer: Two triangles: B=46.77°,C=101.23°,c14.81B = 46.77°,\, C = 101.23°,\, c \approx 14.81; or B=133.23°,C=14.77°,c3.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