← All calculatorsMath

Pythagorean Theorem

In any right triangle the square on the hypotenuse equals the sum of the squares on the other two sides. That single relation lets you find a missing side from the other two, and it underpins distance measurement in every dimension.

c = √(a²+b²)
5

How to use the Pythagorean Theorem

  1. Enter the two side lengths you know.
  2. Leave the unknown side blank.
  3. Read the missing side plus area, perimeter and the two acute angles.
  4. Check that the hypotenuse is the longest side — if not, the inputs are mislabelled.

How the calculation works

a² + b² = c², with c always the side opposite the right angle. To find a leg, rearrange to a = √(c² − b²); if that expression is negative your supposed hypotenuse is shorter than a leg, which is geometrically impossible. Angles follow from basic trigonometry: θ = arctan(opposite ÷ adjacent).

The theorem generalises directly into the distance formula: the gap between two points is √((x₂−x₁)² + (y₂−y₁)²), which is just Pythagoras applied to the horizontal and vertical differences. It extends to three dimensions by adding a z term, which is how diagonal spans of boxes and rooms are found. Builders use the 3-4-5 special case in reverse to square up corners on site.

Formula
c = √(a² + b²) ; a = √(c² − b²)

Source: Euclid's Elements, Book I, Proposition 47 — the Pythagorean theorem.

Worked example

A ladder reaching 5.6 m up a wall with its base 2.1 m out from it.

  1. a = 5.6, b = 2.1.
  2. a² + b² = 31.36 + 4.41 = 35.77.
  3. c = √35.77 = 5.98 m.
  4. Angle at base = arctan(5.6 / 2.1) = 69.4°.

The ladder is about 5.98 m long, leaning at 69.4° — steeper than the 75° maximum many safety guides allow.

Frequently asked questions

Does it work for non-right triangles?+

No. Use the law of cosines, which reduces to Pythagoras when the angle is exactly 90°.

What is a Pythagorean triple?+

A set of three integers satisfying the theorem, such as 3-4-5, 5-12-13 and 8-15-17.

How do I check a corner is square?+

Measure 3 units along one edge and 4 along the other; if the diagonal is exactly 5, the corner is square.

How does this extend to 3D?+

The space diagonal of a box is √(l² + w² + h²) — the theorem applied twice.

Last reviewed August 31, 2026. We review this page whenever the underlying formula, tax year, published rate or standard changes.

Related

More in Math