Skip to content
MasterMath

Pythagorean Theorem Calculator

Find any missing side of a right triangle. Leave the one you want at zero and fill in the other two.

The missing side

—

The missing side—
Leg a—
Leg b—
Hypotenuse—
Area of the triangle—
Check—

How this was worked out

    The formula

    a² + b² = c²

    Where it comes from

    In a right triangle, the square built on the hypotenuse has exactly the same area as the two squares on the legs combined. That is the theorem, and it is a statement about areas before it is a formula about lengths.

    How to work it out by hand

    1. Identify the hypotenuse: it is the side opposite the right angle, always the longest
    2. To find it, square both legs and add them
    3. To find a leg, square the hypotenuse and subtract the known leg squared
    4. Take the square root

    What is worth knowing

    The theorem was known in practice long before Pythagoras: Babylonian tablets list right-triangle triples a thousand years earlier, and Egyptian rope-stretchers used the 3-4-5 triangle to lay out right angles. What the Greeks contributed was the proof. It also has a converse that is genuinely useful on site: if a² + b² = c², the triangle *must* be right-angled, which is why the 3-4-5 trick squares a corner reliably. And it generalises — the law of cosines is the same statement with a correction term for triangles that are not right-angled.

    Frequently asked questions

    When can I use the Pythagorean theorem?

    Only on right triangles. For any other triangle you need the law of cosines.

    Which side is the hypotenuse?

    The one opposite the right angle. It is always the longest side.

    What is a Pythagorean triple?

    Three whole numbers that satisfy the theorem, like 3-4-5 or 5-12-13. They are useful for laying out right angles without measuring.

    Does it work in three dimensions?

    Yes, with an extra term: the space diagonal of a box is √(a² + b² + c²).