Skip to content
Calculatified

Pythagorean Theorem Calculator

Find the missing side of a right triangle from the other two: a² + b² = c².

Leave the side you want empty
ResultUpdates as you type
Side c
5
b = 4c = 5a = 3
Area
6
Perimeter
12
Angle A (opposite a)
36.869898°
Angle B (opposite b)
53.130102°
Height to hypotenuse
2.4
Step-by-step solution
  1. c² = a² + b² = 3² + 4² = 9 + 16 = 25
  2. c = √25 = 5
Advertisement

About the Pythagorean Theorem calculator

This Pythagorean theorem calculator finds the missing side of a right triangle. Enter any two sides, leave the third box empty, and it uses a² + b² = c² to work it out. You also get both acute angles, the area, the perimeter, the height to the hypotenuse and a labelled diagram.

It is ideal for geometry students, and practical for builders, DIYers and designers who need a diagonal: the length of a ladder, a roof rafter, a ramp or a TV screen. The steps show the squares and the square root with your numbers.

How to use it

  1. Enter the two sides you know in Leg a, Leg b or Hypotenuse c.
  2. Leave the side you want to find empty.
  3. Read the missing side at the top.
  4. Check the angles, area, perimeter and diagram below.

The formula

In any right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides:

a² + b² = c²

  • a, b — the legs, the two sides that meet at the right angle
  • c — the hypotenuse, the longest side, opposite the right angle

Rearranged for each unknown:

  • c = √(a² + b²)
  • a = √(c² − b²)
  • b = √(c² − a²)

The angles come from trigonometry: angle A (opposite a) is arctan(a ÷ b), and angle B = 90° − A. The area is a × b ÷ 2.

Worked example: how high does a ladder reach?

A 13-foot ladder leans against a wall with its foot 5 feet from the wall. How high up does it reach? The ladder is the hypotenuse, so c = 13 and one leg is 5.

a = √(13² − 5²) = √(169 − 25) = √144 = 12 feet.

The angle between the ladder and the ground is arctan(12 ÷ 5) ≈ 67.4°. Ladder safety guides often suggest a ratio of about 4 up for every 1 out, which is close to 76°.

The most common mistake is adding when you should subtract. If you know the hypotenuse, you subtract the known leg's square. If you know both legs, you add. Remember that the hypotenuse must always be the longest side; the calculator warns you if it is not.

Pythagorean triples and the 3-4-5 rule

A Pythagorean triple is a set of three whole numbers that fit a² + b² = c² exactly. The best known is 3, 4, 5, because 9 + 16 = 25. Others include 5-12-13, 8-15-17 and 7-24-25. Any multiple of a triple also works, such as 6-8-10 or 9-12-15.

Builders use the 3-4-5 rule to check that a corner is square. Measure 3 units along one wall and 4 along the other; if the diagonal between those marks is exactly 5, the corner is a true right angle. For bigger layouts, use 6-8-10 or 30-40-50.

The theorem also works backwards: if a² + b² = c² for a triangle's sides, it must have a right angle. For triangles without one, use the triangle calculator.

Advertisement

Frequently asked questions

How do I find the hypotenuse?

Square both legs, add them, and take the square root. For legs 6 and 8: √(36 + 64) = √100 = 10.

How do I find a missing leg?

Square the hypotenuse, subtract the square of the known leg, and take the square root. With c = 10 and a = 6: b = √(100 − 36) = 8.

Does the Pythagorean theorem work for all triangles?

No, only for right triangles. For other triangles, use the law of cosines, c² = a² + b² − 2ab·cos C, which reduces to Pythagoras when C = 90°.

How do I find the diagonal of a rectangle?

The diagonal splits the rectangle into two right triangles, so it is √(length² + width²). A 16 by 9 screen has a diagonal of √337 ≈ 18.36 units.

What units should I use?

Any unit, as long as both sides use the same one. The answer comes out in that unit.

Last updated October 24, 2026. Results are estimates for education and planning — see our disclaimer.