Pythagorean Theorem Calculator

Based on Dutch rules and rates, 2026

Calculate the hypotenuse or a leg of a right triangle with the Pythagorean theorem.

This tool applies Dutch rules. Text translated from Dutch; the Dutch version prevails. Open the Dutch version

Choose the hypotenuse if you know the two legs, or a leg if you know the hypotenuse and the other leg.

The length of one of the two sides that enclose the right angle.

The length of the other side that encloses the right angle.

The length of the hypotenuse, the side opposite the right angle. It is always the longest side.

Please check

Length of the side you want

5

Add to your site

Last reviewed: · 7 fixed checks

Please note: The result is an estimate and has been rounded. Actual costs and values may differ, and no rights can be derived from this calculation.

How the calculation works

Calculate the length of a side of a right triangle with the Pythagorean theorem. Choose whether you want the hypotenuse or a leg, enter the sides you know, and you see the length of the side you want at once.

The result has the same unit as the numbers you enter: centimetres, metres or whatever you use.

In a right triangle the sum of the squares of the lengths of the legs equals the square of the length of the hypotenuse: a² + b² = c².

If you want the hypotenuse, the calculator adds the squares of a and b and takes the square root of the sum. If you want a leg, it subtracts the square of the known leg from the square of the hypotenuse and takes the square root of the difference: b² = c² − a². The result is rounded to six decimals.

Formula

Hypotenuse: c = √(a² + b²). Leg: b = √(c² − a²). The hypotenuse is the side opposite the right angle.

Assumptions

  • The triangle is a right triangle: one of the angles is exactly 90 degrees.
  • All sides are in the same unit.
  • The hypotenuse is the longest side: when you look for a leg it must be larger than the leg you entered.
  • The result is rounded to six decimals.

What this tool leaves out

  • The theorem only holds for a right triangle.
  • The calculator uses the lengths you enter and does not check whether the triangle really is a right triangle.

Example calculations

The button fills in the calculator above, so you can carry on from there.

  • Hypotenuse for 3 and 4

    Length of the side you want

    5

    The hypotenuse (c) · Leg a 3 · Leg b 4 · Hypotenuse c 5

  • Leg for hypotenuse 13 and leg 5

    Length of the side you want

    12

    A leg (b) · Leg a 5 · Leg b 4 · Hypotenuse c 13

  • Hypotenuse for 1 and 1

    Length of the side you want

    1.414214

    The hypotenuse (c) · Leg a 1 · Leg b 1 · Hypotenuse c 5

Frequently asked questions

What is the Pythagorean theorem?

In a right triangle the sum of the squares of the legs equals the square of the hypotenuse: a² + b² = c².

How do I calculate the hypotenuse?

Square the two legs, add the results and take the square root. For 3 and 4 that is 9 + 16 = 25 and the square root of 25 is 5.

How do I calculate a leg when the hypotenuse is known?

Subtract the square of the known leg from the square of the hypotenuse and take the square root. With a hypotenuse of 5 and a leg of 3 that is 25 − 9 = 16, and the square root of 16 is 4.

What is the hypotenuse?

The hypotenuse is the side opposite the right angle. It is always the longest side of the triangle.

Does the theorem hold for every triangle?

No, only for a right triangle, a triangle with an angle of 90 degrees.

Sources and checks

How we check it

This calculator has 7 fixed checks: 6 calculations with a result that is fixed in advance, and 1 cases of invalid input that must be rejected. They all run automatically every time we publish; if one fails, the calculator does not go live.

See the calculations
  • The hypotenuse (c) · Leg a 3 · Leg b 4 · Hypotenuse c 5 → Length of the side you want 5
  • The hypotenuse (c) · Leg a 5 · Leg b 12 · Hypotenuse c 5 → Length of the side you want 13
  • The hypotenuse (c) · Leg a 1 · Leg b 1 · Hypotenuse c 5 → Length of the side you want 1.414214
  • A leg (b) · Leg a 3 · Leg b 4 · Hypotenuse c 5 → Length of the side you want 4
  • A leg (b) · Leg a 5 · Leg b 4 · Hypotenuse c 13 → Length of the side you want 12
  • The hypotenuse (c) · Leg a 0 · Leg b 7 · Hypotenuse c 5 → Length of the side you want 7
Changes
  • : First version. Calculate the hypotenuse or a leg of a right triangle.

Last reviewed: · How we build and check our tools

Add this tool to your site

Have a website? Add this tool to it as a widget. You choose the colours, the tool stays up to date and you don't need an account. How widgets work

More tools

Find a tool

    More on the privacy page