All Tools

Pythagorean Theorem Calculator: a² + b² = c²

Find the missing side of a right triangle with the Pythagorean theorem. Enter two sides to get the third, with every step such as 17² − 8² = 225, free in your browser.

abcAB
Known values: enter exactly two, at least one a side

Solved triangle

Side a
3
Side b
4
Hypotenuse c
5
Area
6
Perimeter
12
Height to the hypotenuse
2.4

Steps

  1. c² = a² + b² = 3² + 4² = 9 + 16 = 25
  2. c = √25 = 5
  3. A = atan(a / b) = 36.8698976458°
  4. B = 90° − A = 53.1301023542°
  5. Area = a × b / 2 = 6
  6. Perimeter = a + b + c = 12

Pythagorean Theorem Calculator

This page shows only the three sides of a right triangle. Enter any two of them and the calculator finds the third with the Pythagorean theorem, a² + b² = c², and shows every step: the squares, the sum or difference, and the square root. It also gives the area, the perimeter and the height to the hypotenuse. Leave the side you want to find empty.

The theorem

a2+b2=c2c=a2+b2b=c2−a2a^2 + b^2 = c^2 \qquad c = \sqrt{a^2 + b^2} \qquad b = \sqrt{c^2 - a^2}

In every right triangle, the square on the hypotenuse c, the side opposite the right angle, has the same area as the squares on the two legs a and b put together. The theorem is named after the Greek mathematician Pythagoras, though Babylonian tablets show it was known more than a thousand years earlier.

How to use it

Steps

  1. Enter two sides: both legs to find the hypotenuse, or one leg and the hypotenuse to find the other leg.
  2. Leave the third field empty.
  3. Read the missing side and the steps that found it.

Worked examples

Finding the hypotenuse: a = 3, b = 4

c² = 3² + 4² = 9 + 16 = 25, so c = √25 = 5.

Finding a leg: a = 8, c = 17

b² = c² − a² = 17² − 8² = 289 − 64 = 225, so b = √225 = 15. The triangle 8, 15, 17 is a Pythagorean triple.

A ladder against a wall

A 5 m ladder stands with its foot 1.4 m from the wall. The height it reaches is √(5² − 1.4²) = √(25 − 1.96) = √23.04 = 4.8 m.

Pythagorean triples

Some right triangles have whole-number sides: 3, 4, 5; 5, 12, 13; 8, 15, 17; 7, 24, 25 and 20, 21, 29. Any multiple of a triple is also a triple, so 6, 8, 10 and 9, 12, 15 work too. Builders have used the 3-4-5 rule for centuries to set out a square corner.

Using the theorem in real life

The theorem turns up whenever two distances meet at a right angle. A screen's size is its diagonal, so a screen 16 units wide and 9 high has a diagonal of √(256 + 81) = √337, about 18.36 units. On a map, walking 300 m east and 400 m north puts you 500 m from where you started in a straight line. Carpenters check that a frame is square by measuring its diagonals, and the same idea gives the distance between two points on a graph.

Checks

The hypotenuse must be longer than either leg, because c² is a² plus something positive. If you enter a hypotenuse that is equal to or shorter than a leg, the page explains that no right triangle has those sides. Sides must be greater than 0.

Privacy

Nothing is uploaded; every calculation runs in your browser and never leaves your device.

Related tools

To solve a triangle from a side and an angle, use the full Right Triangle Calculator. For the area of any triangle, try the triangle area calculator.

Frequently asked questions

What is the Pythagorean theorem?

In a right triangle the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². For legs 3 and 4 the hypotenuse is √(9 + 16) = √25 = 5.

How do I find a missing leg?

Rearrange to b² = c² − a². For a = 8 and c = 17 that is 289 − 64 = 225, so b = √225 = 15. Enter the two sides you know and leave the third field empty.

Why does the calculator say the hypotenuse must be longer?

c² = a² + b² means c is always longer than each leg. If c is equal to or shorter than a leg, c² − a² is zero or negative and no right triangle exists.

What are Pythagorean triples?

Whole numbers that fit a² + b² = c², such as 3, 4, 5; 5, 12, 13; 8, 15, 17 and 7, 24, 25. Any multiple of a triple, such as 6, 8, 10, is also a triple.

Can I find the angles too?

Yes. The main right triangle calculator also accepts an angle and shows both angles, the area, the perimeter and the height to the hypotenuse.

Other related tools