Calculate

Calculate

Measurements convert when you switch units

m
m
m

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. Compute c = √(3² + 4²) = √(9 + 16) = √25.
  3. Result: c = 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

Meters, centimeters, inches, or feet all work, but all three sides must share one unit. Job sites often use meters or feet; drawings may use millimeters.

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 the mode to solve for side a or side 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.

Use any unit you want, but keep all three sides in the same unit for a correct result.

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-08-15 — 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.