Skip to main content

Notice Send us your feedback to help us improve this service.

Pythagorean Theorem Calculator

Calculate the missing side of a right triangle.

What this calculator does

This tool finds the missing side of a right-angled triangle. Enter the two sides you know, leave the third at zero, and it solves for the one you need.

Builders use it to square corners and cut rafters. Homeowners use it to size a ladder, a ramp or a diagonal brace. Students use it to check their work.

How we work it out

In any right-angled triangle, the two short sides squared and added together equal the longest side squared: a² + b² = c². Side C, the hypotenuse, is the long side opposite the right angle.

Leave the side you want at zero. To find C, we add the squares of A and B and take the square root. To find A or B, we take the square of the known short side away from the square of C, then take the root. Answers show four decimal places.

Which box gets which number

Sides A and B are the two sides that form the square corner. They are called the legs, and it does not matter which one you call A. Side C, the hypotenuse, is always the longest side. It sits across from the square corner.

Enter the two sides you know and leave the missing one at zero. If you fill in all three, the calculator shows your numbers back without checking them. To test whether a corner is truly square, enter only A and B, then compare the result with the C you measured.

Squaring a corner with 3, 4 and 5

A triangle with sides 3, 4 and 5 always has a perfect right angle, because 9 plus 16 equals 25. Builders use this to lay out decks, sheds and foundations. Measure 3 units along one side from the corner and 4 units along the other. Mark both points. The distance between the marks should be exactly 5 units. If it is longer, the corner is too open. If it is shorter, it is too tight.

For bigger layouts, scale it up. Sides of 6, 8 and 10, or 9, 12 and 15, work the same way in feet or metres, and give a more accurate check along a long wall.

When you see an error

The hypotenuse must be longer than either leg. If you are finding A or B and enter a C that is shorter than the other side, there is no answer, and the calculator shows an error. Check that you put the longest measurement in C.

The rule only works with a right angle. For triangles without one, use the triangle calculator for the area, or the law of cosines for a missing side.

What this does not include

  • Triangles without a right angle
  • Checking your numbers when all three sides are filled in
  • Angles, which it does not show
  • Converting between units

Common questions

Which side is the hypotenuse?

The longest one. It sits opposite the right angle, so it never touches the square corner. On a ladder leaning against a wall, the ladder itself is the hypotenuse. The wall and the ground are the other two sides.

How far from the wall should a ladder be?

Canadian workplace safety guidance is to set the base 1 foot out for every 4 feet up, or about 0.3 metres out for every 1.2 metres up. Enter the height as B and a quarter of it as A. C then gives the length of ladder needed to reach that point, before the extra length that should stick up above it.

Can I find a short side instead of the long one?

Yes. Enter the hypotenuse in C and the short side you know in A or B. Leave the other short side at zero. For example, if a 5 metre brace runs to a point 3 metres up a post, leave A at zero, put 3 in B and 5 in C, and you get 4 metres along the ground.

Why is my answer a long decimal?

Square roots are rarely whole numbers. The calculator shows four decimal places so you can round to suit the job. For building, round to the smallest mark on your tape measure. For homework, round the way your teacher or textbook asks.

Does it work for triangles without a right angle?

No. The rule a² + b² = c² is only true when one angle is exactly square. For other triangles, the answer would be wrong without any warning. Use the law of cosines, which adds a correction for the angle, or measure the third side directly.

Sources

Last reviewed October 18, 2026. How we check our numbers.

This is an estimate to help you plan. It is not financial, medical, or legal advice. Talk to a professional before you make a big decision.

Add this calculator to your website

Free to use on your site, blog or intranet. Paste this code where you want the calculator to appear. It works on its own, sets no cookies and shows no ads.