Pythagoras theorem calculator

In a right-angled triangle the square of the longest side (the hypotenuse) equals the sum of the squares of the other two. It lets you find any missing side when you know the other two.

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What this topic covers

Square the two sides you know and add them to find the hypotenuse (hypotenuse from the two shorter sides), or subtract to find a shorter side (shorter side from the hypotenuse). The theorem works in three dimensions too (Pythagoras in 3D), and the general statement is on the Pythagoras formula page.

Each part of this topic has its own page with the formula, worked examples and a solver: Pythagoras in 3D, Pythagoras' theorem, Hypotenuse from the two shorter sides, Shorter side from the hypotenuse.

Closely related topics: Right-angled trigonometry, Sine and cosine rule, Circles and 3D shapes.

What is it used for?

In a right-angled triangle the square on the hypotenuse equals the sum of the squares on the other two sides. It finds a missing side whenever two are known.

How to solve it

  1. Identify the hypotenuse: the side opposite the right angle, and always the longest.
  2. To find the hypotenuse, add the squares of the other two sides and take the square root.
  3. To find a shorter side, subtract the square of the known short side from the square of the hypotenuse, then take the square root.
  4. Round only at the end, and give the units.
  5. Sense check: the hypotenuse must be longer than either of the other sides.

Worked examples

The examples marked with a button were worked out by the solver on this page. You can try each one yourself.

Example 1: right triangle a=3 b=4

Worked out by the solver on this page. Press the button to try it yourself.

Pythagoras Answer checked
Answer
c=5c = 5
  1. Label the two shorter sides and the hypotenuse
  2. Use Pythagoras:
  3. Work out the squares and add
  4. Take the square root
  5. Check: the hypotenuse is the longest side

Example 2: right triangle a=5 b=12

Worked out by the solver on this page. Press the button to try it yourself.

Pythagoras Answer checked
Answer
c=13c = 13
  1. Label the two shorter sides and the hypotenuse
  2. Use Pythagoras:
  3. Work out the squares and add
  4. Take the square root
  5. Check: the hypotenuse is the longest side

Example 3: right triangle c=13 a=5

Worked out by the solver on this page. Press the button to try it yourself.

Pythagoras Answer checked
Answer
x=12x = 12
  1. Label the sides: the hypotenuse is the longest side, opposite the right angle
  2. Use Pythagoras:
  3. Rearrange to find
  4. Take the square root
  5. Check: the squares add up

Example 4: right triangle a=7 b=9

Worked out by the solver on this page. Press the button to try it yourself.

Pythagoras Answer checked
Answer
c=130c = \sqrt{130}
  1. Label the two shorter sides and the hypotenuse
  2. Use Pythagoras:
  3. Work out the squares and add
  4. Take the square root
  5. Check: the hypotenuse is the longest side

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

Hypotenuse

a = 3, b = 4: c = 5

Add the squares, then root.

A shorter side

c = 13, a = 5: b = 12

Subtract the squares.

Not a whole number

a = 7, b = 9: c ≈ 11.40

Round at the end.

3D diagonal

a cuboid 2 × 3 × 6: 7

Add three squares.

Word problems

Square the known sides, add to find the hypotenuse or subtract to find a shorter side, then take the square root.

Hypotenuse

Find c when a = 3, b = 4.

  1. Add the squares9 + 16 = 25
  2. Rootc = 5
  3. Check: 3² + 4² = 5² ✓5

A shorter side

Find b when c = 13, a = 5.

  1. Subtract169 − 25 = 144
  2. Rootb = 12
  3. Check: 25 + 144 = 169 ✓12

A decimal answer Higher

Find c when a = 7, b = 9.

  1. Add the squares49 + 81 = 130
  2. Root11.40
  3. Check: 11.4² ≈ 130 ✓11.4

A space diagonal Higher

Find the diagonal of a 2 × 3 × 6 cuboid.

  1. Add three squares4 + 9 + 36 = 49
  2. Root7
  3. Check: 7² = 49 ✓7

Common mistakes

Adding when finding a shorter side

b² = 13² + 5² ✗

b² = 13² − 5² ✓

The hypotenuse is the largest.

Forgetting the square root

c = 25 ✗

c = 5 ✓

You find c².

Using the theorem on a triangle with no right angle

any triangle ✗

right-angled only ✓

Use the cosine rule otherwise.

Labelling a shorter side as the hypotenuse

wrong c ✗

c is opposite the right angle ✓

Label first.

Exam tips

  1. c is opposite the right angle.
  2. Add to find c, subtract to find a or b.
  3. Root at the end.
  4. Check c is the longest side.
  5. Round only at the end.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. Hypotenuse for a = 6, b = 8 Foundation

10

2. Missing side for c = 10, a = 6 Foundation

8

3. Hypotenuse for a = 5, b = 7 (2 dp) Foundation

8.6

4. Missing side for c = 25, b = 24 Higher

7

5. Diagonal of a 3 × 4 × 12 cuboid Higher

13

6. Hypotenuse for a = 8, b = 15 Higher

17

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Hypotenuse
The longest side.
Right angle
90°.
Pythagorean triple
Whole numbers such as 3, 4, 5.
Square root
Undoes squaring.
Diagonal
A line across a shape.
Converse
If a² + b² = c² the triangle is right-angled.

Frequently asked questions

What is Pythagoras’ theorem?

a² + b² = c² in a right-angled triangle with hypotenuse c.

How do I find a shorter side?

Subtract the squares: b = √(c² − a²).

Does it work on any triangle?

No, only right-angled triangles.

Which page covers the hypotenuse?

hypotenuse from the two shorter sides.

Which page covers a shorter side?

shorter side from the hypotenuse.

Which page covers 3D?

Pythagoras in 3D.

More in Geometry and measures and the formula sheets.