Explore all tools
FREE ONLINE TOOLNo visitor account required

Pythagorean Theorem Calculator

Find the missing side of a right triangle with a² + b² = c² — with the full working shown step by step and a to-scale diagram.

—

Missing side

Leg a—
Leg b—
Hypotenuse c—
Area—
Perimeter—

Note: The theorem only applies to right triangles. When solving for a leg, the hypotenuse must be the longest of the three values.

Report a problem with this tool

The Theorem and How to Use It

In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a2 + b2 = c2. One equation with three quantities means any one of them can be found from the other two — take the square root of the sum of squares to find the hypotenuse, or the square root of the difference to find a leg. The steps table under the result shows the substitution for your numbers, because in homework and in the workshop the working matters as much as the answer.

bca

Worked Example

A ladder leans on a wall with its foot 3 m out and its top 4 m up: a = 4, b = 3, so c = √(16 + 9) = √25 = 5 m of ladder. In reverse, a 13 m ladder reaching a point 12 m up stands √(169 − 144) = 5 m from the wall. The calculator's area and perimeter figures assume the two values describe the legs of the same right triangle, so the 3-4-5 example gives an area of 6 and a perimeter of 12.

Pythagorean Triples

Whole-number solutions — triples — are worth recognising: 3-4-5, 5-12-13, 8-15-17, 7-24-25, and every multiple of them (6-8-10 is just 3-4-5 doubled). Carpenters use 3-4-5 to square a foundation corner, and screen sizes are quoted as the hypotenuse of the panel: a "55-inch TV" is a 55-inch diagonal, whatever its width and height. If your two inputs and the answer all come out whole, you have found a triple, and the steps table will show the squares adding up exactly.

Frequently Asked Questions

What is the Pythagorean theorem?

In a right triangle, a squared + b squared = c squared, where c is the hypotenuse. It relates the three sides so any one can be found from the other two.

Can I use it on any triangle?

No — it only holds for right triangles. For other triangles the law of cosines generalises it; our Triangle Calculator handles those.

How do I find a leg instead of the hypotenuse?

Rearrange: leg = sqrt(c squared minus the other leg squared). Choose the leg in the Solve for menu and enter the hypotenuse and the known leg.

Why does my hypotenuse come out shorter than a leg?

That cannot happen in a real right triangle — the hypotenuse is always the longest side. Check that the value entered as c really is the side opposite the right angle.