Skip to content
SoftwareSolutions.net
Calculators & Converters

Pythagorean theorem calculator

Find the hypotenuse of a right-angled triangle from its two shorter sides.

Try it

Ready

Inputs

Result

The result appears here as you type.

About Pythagorean theorem calculator

A Pythagorean theorem calculator finds the longest side of a right-angled triangle from the lengths of the two shorter sides. Enter side a and side b, and the tool returns the hypotenuse, which is the side opposite the right angle. The result is useful in building, carpentry, navigation, gardening and any task that involves checking a corner is square.

The theorem states that the square of the hypotenuse equals the sum of the squares of the other two sides. It is one of the oldest and most widely used results in geometry, and it turns simple measurements into a reliable length without needing to measure the diagonal directly.

How to use Pythagorean theorem calculator

  1. Enter the length of one of the two shorter sides.
  2. Enter the length of the other shorter side, in the same unit.
  3. Read the hypotenuse, which is the diagonal across the triangle.
  4. Check the result with a tape measure where precision matters.

The formula

The hypotenuse equals the square root of side a squared plus side b squared. For sides of 3 and 4, the squares are 9 and 16, which add to 25, and the square root is 5. That 3, 4, 5 triangle is the most famous example and is widely used to set out right angles.

Keep the units the same for both sides. If one side is in metres and the other in centimetres, convert before entering them, or the hypotenuse will be wrong.

The theorem only applies to right-angled triangles. For other triangles, use the law of cosines or a dedicated triangle solver.

Using it on site

To check that a corner is square, measure 3 units along one wall and 4 units along the other. The diagonal between those marks should be exactly 5 units. Scaling up, 30, 40 and 50 centimetres give the same check on a smaller scale.

Measure the diagonal of a rectangle to confirm the frame is square. If the two diagonals match, the corners are right angles, and the frame is square.

For a ramp, ladder or roof, the theorem finds the slope length from the horizontal run and vertical rise. Add a little extra for cutting and fitting, and check the local rules for angles and safety.

Use the theorem to check diagonals in a room or frame before fixing anything in place. Measure the two sides and the diagonal, and compare the calculated value with the actual reading. A small difference is normal from a rough measurement, but a large gap suggests the corner is not square and needs adjusting before the next stage of the work.

Frequently asked questions

Can I use it to find a shorter side?

Not with this tool, which gives the hypotenuse. Rearrange the formula: a equals the square root of c squared minus b squared, where c is the hypotenuse.

Does it work for any triangle?

No, only for right-angled triangles, where one angle is exactly 90 degrees.

Why is the result sometimes irrational?

Many hypotenuses are not whole numbers. The result is shown to four decimal places, which is precise enough for most practical work.

Related tools

Tools that pair well with this one.