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.
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.
The theorem
a² + b² = c²The hypotenuse
c = √(a² + b²)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.A right triangle has legs of 3 and 4. How long is the hypotenuse?
- a² + b² = c²
- c² = 3² + 4² = 9 + 16 = 25
- c = √25 = 5
5. A 3-4-5 triangle, the best-known Pythagorean triple.
2.A right triangle has two legs of 5. How long is the hypotenuse?
- a² + b² = c²
- c² = 5² + 5² = 25 + 25 = 50
- c = √50 = 5√2 ≈ 7.0711
5√2, about 7.0711.
3.The hypotenuse is 13 and one leg is 5. How long is the other leg?
- b² = c² − a²
- b² = 13² − 5² = 169 − 25 = 144
- b = √144 = 12
12.
4.How long a ladder reaches 12 feet up a wall with its foot 5 feet out?
- a² + b² = c²
- c² = 12² + 5² = 144 + 25 = 169
- c = √169 = 13
13 feet.
5.A TV screen is 48 inches wide and 27 inches tall. What is its diagonal size?
- a² + b² = c²
- c² = 27² + 48² = 729 + 2304 = 3033
- 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.
Related calculators
- Triangle CalculatorSolve any triangle from three sides and angles: the missing sides, angles, area and perimeter.School
- Slope CalculatorThe slope of the line through two points as an exact fraction, with its equation, angle, grade and midpoint.School
- Area CalculatorThe area of a square, rectangle, triangle, trapezoid, parallelogram, circle or ellipse, with the formula worked through.School
- Square Footage CalculatorArea of rectangles, circles, triangles and multi-room layouts.Home
- Quadratic Formula CalculatorSolve ax² + bx + c = 0 with the discriminant and every substitution shown, and exact roots in simplest radical form.School
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