Calculate

c = √(a² + b²)

m
m
m

Examples

Updates as you type

Result

—

The formula

For a right triangle, a and b are the legs and c is the hypotenuse. Use c = √(a² + b²) to find the hypotenuse, or rearrange to a = √(c² − b²) and b = √(c² − a²) to find a missing leg.

a² + b² = c²

Worked example

  1. Find c when a = 3 and b = 4.
  2. Square each leg: a² = 9 and b² = 16; add them: c² = 25.
  3. Take the square root: c = √25 = 5.

Result: c = 5

How the calculation works

The Pythagorean theorem relates the sides of a triangle that has exactly one 90° angle. Choose the mode for the side you need, then enter the other two sides in the same unit.

Hypotenuse and legs

Hypotenuse c sits opposite the right angle and is always the longest side. When solving for leg a or b, c must be greater than the known leg — otherwise the value under the square root is negative and the input is invalid.

Keep units consistent

Pick one length unit for all sides. The calculator converts internally (1 ft = 0.3048 m exactly) and can show a secondary length in the opposite unit family.

Construction shortcuts

The 3-4-5 triple (and scaled versions like 6-8-10) is a practical way to square a corner with a tape measure when a framing square is not handy.

What this tool does not cover

Obtuse or acute-only triangles, spherical trigonometry, and detailed error propagation are out of scope. For non-right triangles, use the law of cosines or another formula.

Interesting facts

Classic 3-4-5 triangle

The 3-4-5 triangle is the most familiar Pythagorean triple and a practical way to mark a right angle on site.

Distance from coordinates

In coordinate geometry, the theorem gives distance with √((x2 − x1)² + (y2 − y1)²).

Applies only to right triangles

The relation a² + b² = c² is valid only when one angle is exactly 90°.

Frequently asked questions

Yes. Choose Find a or Find b, then enter the hypotenuse and the known leg.

The hypotenuse must be longer than either leg, so c must be greater than the known leg value.

Pick one length unit from the list so all sides share it. Results convert for display when helpful.

It is commonly used for ramps, roof layout, room diagonals, and distance checks in construction and design.

No. For non-right triangles, use other formulas such as the law of cosines.

References

  1. Pythagorean theorem — Khan Academy Right-triangle relationship a² + b² = c².
  2. Pythagorean theorem — MathWorld — Wolfram MathWorld Formal statement and related identities.

For educational and planning use only.

Last reviewed: 2026-10-20 — Reviewed by: Editorial Team

Embed this calculator

Add this calculator to your website with a free iframe widget.

Theme

The widget stretches to the width of its container and adjusts its height automatically.