Skip to content

Pythagorean Theorem Calculator

Find the hypotenuse or a missing leg of a right triangle from the other two sides, with the area, perimeter, angles and a check for whole-number triples.

Formulas last reviewed: September 2026

Disclaimer: Results are calculated with standard formulas and are meant for learning and quick checks. Please double-check important work, especially anything used for exams, engineering, finance or safety.

a² + b² = c²

The Pythagorean theorem says that in a right triangle the square of the hypotenuse (the longest side, opposite the right angle) equals the sum of the squares of the other two sides. It is one of the most useful results in geometry.

Choose which side you want to find and enter the other two. The calculator solves for the hypotenuse or a missing leg and also gives the area, perimeter, both acute angles and whether the sides form a whole-number Pythagorean triple.

How it is calculated

Hypotenuse: c = √(a² + b²)
Missing leg: a = √(c² − b²)

Worked example

Legs 3 and 4

Hypotenuse
5
Area
6
Perimeter
12
Angles
36.87° and 53.13°

3, 4, 5 is the best-known Pythagorean triple. Others include 5, 12, 13 and 8, 15, 17.

Where it helps

  • Checking that a corner is square: a 3-4-5 layout gives a perfect right angle on a building site.
  • Finding the length of a ladder, ramp or diagonal brace.
  • The diagonal of a screen or a rectangle is its hypotenuse.

Frequently asked questions

Does it work for any triangle?

No, only for right triangles. Use the triangle calculator for other triangles.

What is a Pythagorean triple?

A set of three whole numbers that satisfy the theorem, such as 3, 4, 5 or 5, 12, 13.

Which side is the hypotenuse?

The longest side, directly opposite the right angle. It is always longer than either leg.

Why do I get an error for a missing leg?

The hypotenuse must be longer than the known leg. If it is not, no right triangle exists with those numbers.