Skip to content
ChalkCalculator

School

Pythagorean Theorem Calculator

Find the missing side of a right triangle from the other two, with the steps, the exact square root, and the angles.

Enter two sides of a right triangle to find the third.

abc

Enter any two sides and leave the third blank. The hypotenuse is the longest side, opposite the right angle.

Exact calculation. Given your inputs, this is the answer — no estimation involved.

How this calculator works

In a right triangle, the square on the longest side equals the two other squares added together: a² + b² = c². The longest side, c, is the hypotenuse, opposite the right angle; a and b are the legs.

To find the hypotenuse, square both legs, add them and take the square root. To find a leg, square the hypotenuse, subtract the square of the other leg, and take the square root. Each step is shown.

When the answer is not a whole number, it is given exactly as a simplified square root, such as 5√2, as well as a decimal. When all three sides are whole numbers, the triangle is a Pythagorean triple, like 3-4-5, and the calculator says so.

The angles come from the sides too, so the result also gives both acute angles, the area and the perimeter.

The formula

Exactly what happens to your numbers, step by step.

  1. The theorem

    a² + b² = c²
  2. The hypotenuse

    c = √(a² + b²)
  3. A leg

    a = √(c² − b²)        b = √(c² − a²)

A worked example

How long a ladder reaches 12 feet up a wall, with its foot 5 feet out from the wall?

What you enter

Leg a (height up the wall)
12 ft
Leg b (distance out)
5 ft

Step by step

Square the legs
12² + 5² = 144 + 25
Add
c² = 169
Square root
c = √169 = 13

A 13-foot ladder

That is the length from foot to wall, touching exactly at 12 feet. To step off at the top, a ladder needs to reach above the landing point.

Pythagorean theorem questions, worked out

a² + b² = c², applied to homework and to the measuring jobs it is really for.

  1. 1.A right triangle has legs of 3 and 4. How long is the hypotenuse?

    1. a² + b² = c²
    2. c² = 3² + 4² = 9 + 16 = 25
    3. c = √25 = 5

    5. A 3-4-5 triangle, the best-known Pythagorean triple.

  2. 2.A right triangle has two legs of 5. How long is the hypotenuse?

    1. a² + b² = c²
    2. c² = 5² + 5² = 25 + 25 = 50
    3. c = √50 = 5√2 ≈ 7.0711

    5√2, about 7.0711.

  3. 3.The hypotenuse is 13 and one leg is 5. How long is the other leg?

    1. b² = c² − a²
    2. b² = 13² − 5² = 169 − 25 = 144
    3. b = √144 = 12

    12.

  4. 4.How long a ladder reaches 12 feet up a wall with its foot 5 feet out?

    1. a² + b² = c²
    2. c² = 12² + 5² = 144 + 25 = 169
    3. c = √169 = 13

    13 feet.

  5. 5.A TV screen is 48 inches wide and 27 inches tall. What is its diagonal size?

    1. a² + b² = c²
    2. c² = 27² + 48² = 729 + 2304 = 3033
    3. c = √3033 = 3√337 ≈ 55.0727

    About 55.0727 inches, so it is sold as a 55-inch TV.

Assumptions

Every result here rests on these. Change your inputs and the result changes with them.

  • The triangle has a right angle, a true 90°, between legs a and b.
  • All sides are in the same unit.
  • Decimals are shown to four places; exact roots are simplified where they can be.

What this cannot tell you

  • It only works for right triangles. For any other triangle, the triangle calculator uses the law of cosines instead.
  • The hypotenuse must be the longest side. If a leg is entered as longer, there is no such triangle, and the calculator says so.

Questions people ask

How do I find the hypotenuse?

Square the two legs, add them, and take the square root. For legs of 3 and 4: 9 + 16 = 25, and √25 = 5. For legs of 5 and 5: 25 + 25 = 50, and √50 = 5√2, about 7.0711.

What is a Pythagorean triple?

Three whole numbers that fit a² + b² = c². The best known is 3-4-5; others include 5-12-13, 8-15-17 and 7-24-25. Any multiple of a triple is another one, so 6-8-10 works too.

Does the Pythagorean theorem work for any triangle?

No, only right triangles. For other triangles the sides follow the law of cosines, which adds a term for the angle; with a 90° angle that term disappears and leaves a² + b² = c².

How can I check whether a triangle is a right triangle?

Square the two shorter sides and add them. If the total equals the square of the longest side, the triangle is right-angled. Builders use this to square a corner: mark 3 feet along one side and 4 along the other, and the diagonal should be exactly 5.

Sources and review

This calculator uses standard arithmetic with no external rules or published rates, so there is nothing to cite beyond the formulas shown above.

Methodology version 1.0.0 · Last reviewed

Cite this calculator

For coursework, a resource list or your own site. How every calculator is built and checked is set out on the methodology page.

Citation

Chalk Calculator. (2026, October 5). Pythagorean Theorem Calculator (Methodology version 1.0.0). https://chalkcalculator.com/pythagorean-theorem-calculator/

Link to it from your site

<a href="https://chalkcalculator.com/pythagorean-theorem-calculator/">Pythagorean Theorem Calculator</a> from Chalk Calculator