terican

Last verified · v1.0

Calculator · math

Triangle Side Length Calculator

Find any triangle side length using the Pythagorean Theorem, Law of Cosines, or Law of Sines — enter known sides and angles for instant results.

FreeInstantNo signupOpen source

Inputs

Side Length

Explain my result

0/3 free

Get a plain-English breakdown of your result with practical next steps.

Side Lengthunits

The formula

How the
result is
computed.

How the Triangle Side Length Calculator Works

This triangle length calculator determines an unknown side using four proven methods: the Pythagorean Theorem (to find a hypotenuse or a missing leg), the Law of Cosines for two-side-plus-angle configurations, and the Law of Sines for two-angle-plus-side configurations. Selecting the correct method depends entirely on which measurements are already known about the triangle.

Method 1: Pythagorean Theorem — Find the Hypotenuse

For any right triangle, the hypotenuse c is the side opposite the 90° angle and is always the longest side. The relationship between all three sides is described by:

c = √(a² + b²)

Where a and b are the two perpendicular legs. For example, with a = 3 and b = 4, the calculation yields c = √(9 + 16) = √25 = 5. This 3-4-5 triple is among the most recognizable in mathematics and has been used in construction and land surveying for millennia. The University of Georgia Pythagorean Theorem Lesson confirms this identity holds universally for all right triangles — from a 3-millimeter circuit board trace to a 300-meter bridge span.

Method 2: Pythagorean Theorem — Find a Leg

When the hypotenuse and one leg are already measured, the missing leg is found by algebraically rearranging the Pythagorean formula:

a = √(c² − b²)

If the hypotenuse c = 10 and one leg b = 6, then a = √(100 − 36) = √64 = 8. This configuration frequently arises in structural engineering and home improvement, where a diagonal brace length and one wall dimension are measurable, but the perpendicular span must be derived. The same formula applies whether solving for the first or second leg — simply substitute the appropriate known values.

Method 3: Law of Cosines (SAS Configuration)

The Law of Cosines generalizes the Pythagorean Theorem to work with any triangle — not just right triangles. Given two sides a and b and the angle C between them, the third side is computed as:

c = √(a² + b² − 2ab · cos(C))

  • a — length of the first known side
  • b — length of the second known side
  • C — the included angle in degrees between sides a and b

Example: a = 7, b = 10, C = 45°. Then c = √(49 + 100 − 2 × 7 × 10 × cos(45°)) = √(149 − 98.99) = √50.01 ≈ 7.07. A useful check: when C = 90°, cos(90°) = 0 and the formula collapses exactly to the Pythagorean Theorem. As Portland Community College explains, this SAS (Side-Angle-Side) solution is the standard approach for oblique triangles in both academic and applied settings. For obtuse triangles where C exceeds 90°, cos(C) becomes negative, which correctly increases the computed side length.

Method 4: Law of Sines (AAS or ASA Configuration)

The Law of Sines applies when two angles and one known side are available. The proportional relationship between each side and the sine of its opposite angle gives:

c / sin(A) = b / sin(B), which rearranges to c = b · sin(A) / sin(B)

  • b — the known side opposite angle B
  • A — the angle directly opposite the unknown side c
  • B — the angle directly opposite the known side b

Example: b = 12, A = 30°, B = 45°. Then c = 12 × sin(30°) / sin(45°) = 12 × 0.5000 / 0.7071 ≈ 8.49. Surveying crews, GPS triangulation systems, and navigators routinely use this method when two sighting angles from a known baseline are all that can be measured. The UMass Physics 131 Trigonometry Appendix notes that these sine ratios are foundational to vector resolution throughout physics and engineering curricula.

Choosing the Right Method

Match the available inputs to the correct formula before calculating:

  • Two legs known: Use Pythagorean Theorem — Find Hypotenuse
  • Hypotenuse and one leg known: Use Pythagorean Theorem — Find Leg
  • Two sides and their included angle known: Use Law of Cosines
  • One side and two angles known: Use Law of Sines

All angle inputs must be entered in degrees. For a valid triangle to exist, the sum of any two sides must always exceed the third side (the triangle inequality), and the sum of all interior angles must equal exactly 180°. If entered values violate these constraints, no real solution exists. Results are computed to four decimal places for high-precision applications including machining tolerances, architectural layouts, and academic problem-solving.

Reference

Frequently asked questions

What is the Law of Cosines formula for finding a triangle side?
The Law of Cosines formula is c = √(a² + b² − 2ab·cos(C)), where a and b are two known sides and C is the included angle between them. Use it for any SAS (Side-Angle-Side) triangle configuration. For example, with a = 6, b = 8, and C = 60°, the result is c = √(36 + 64 − 48) = √52 ≈ 7.21. The formula works for acute, right, and obtuse triangles alike.
How do you find the missing side of a right triangle using the Pythagorean Theorem?
To find the hypotenuse, use c = √(a² + b²). With legs a = 5 and b = 12, the hypotenuse is √(25 + 144) = √169 = 13. To find a missing leg, rearrange to a = √(c² − b²). With hypotenuse c = 17 and leg b = 15, the missing leg is √(289 − 225) = √64 = 8. Both formulas apply only when one interior angle is exactly 90 degrees.
When should you use the Law of Sines instead of the Law of Cosines?
Use the Law of Sines (c = b·sin(A)/sin(B)) when two angles and one opposite side are known — an AAS or ASA configuration. Use the Law of Cosines when two sides and their included angle (SAS) are given. Avoid the Law of Sines for the ambiguous SSA case, where two different triangles may satisfy the given values. The Law of Cosines is always unambiguous for SAS and SSS configurations and is generally preferred when angle values are uncertain.
What is a Pythagorean triple and can this calculator verify one?
A Pythagorean triple is a set of three positive integers (a, b, c) satisfying a² + b² = c². Well-known examples include 3-4-5, 5-12-13, 8-15-17, and 7-24-25. To verify any triple, enter the two smaller integers as legs a and b using the Pythagorean Theorem method and confirm the calculator returns the expected integer hypotenuse. Construction professionals use 3-4-5 triples to lay out perfectly square corners on job sites without digital measuring tools.
Can this triangle side length calculator handle obtuse triangles?
Yes, the Law of Cosines method handles obtuse triangles correctly. When the included angle C exceeds 90°, the cosine value becomes negative, which increases the magnitude of the subtracted term and yields a longer computed side. For example, with a = 5, b = 7, and C = 120°, the result is c = √(25 + 49 − 2·5·7·cos(120°)) = √(74 + 35) = √109 ≈ 10.44. The Pythagorean Theorem methods apply strictly to right triangles and will produce incorrect results if used for obtuse or acute triangles.
What three inputs does the Law of Sines method require?
The Law of Sines method requires three inputs: the known side b (the side opposite angle B), angle A in degrees (the angle opposite the unknown side c), and angle B in degrees (the angle opposite side b). The calculator then computes c = b·sin(A)/sin(B). The sum of angles A and B must be strictly less than 180° for a valid triangle. When angle A equals angle B, the resulting triangle is isosceles and the computed side c will equal the input side b.