Pythagorean Theorem Calculator

Solve the hypotenuse or a missing leg with a² + b² = c²: squares, angles, area, and perimeter included.

Details

Hypotenuse (c)

5

All three sides3, 4, 5
Area of the triangle6
Distance around it12
The two other angles36.8699° and 53.1301°

This finds the missing side of a right-angled triangle. Enter any two sides and it returns the third.

It also gives all three sides together and the area of the triangle, and shows each step of the squaring, adding and square-rooting.

What is the Pythagorean theorem?

The Pythagorean theorem is a rule about right-angled triangles: the two short sides, squared and added, always equal the longest side squared.

The longest side is called the hypotenuse. It is always the one opposite the right angle, and always the longest of the three.

So if you know any two sides, you can always work out the third. That is the whole point, and it is why the rule has been used for building work for thousands of years.

a² + b² = c²
one short side, squared
+
the other short side, squared
=
hypotenuse (longest side), squared

c is always the side opposite the right angle. a and b are the two sides that meet at the right angle, and it does not matter which one you call a.

What to enter

Solve for
Choose whether you are looking for the hypotenuse (you know both short sides) or a short side (you know one short side and the hypotenuse).
Leg a / Leg b
The two sides that meet at the right angle. Order does not matter.
Hypotenuse c
The long side opposite the right angle. It must be larger than either short side, or the triangle cannot exist.

What this assumes

The triangle has a genuine right angle. Without one, this rule simply does not apply.

All three sides use the same unit.

How to calculate a missing side of a right triangle

Square, add or subtract, then take the square root. The only thing to get right is which side you are missing.

c = √(a² + b²) a = √(c² − b²)
a, b
The two short sides
c
The hypotenuse, opposite the right angle
  1. Identify the hypotenuse. Find the right angle, then look straight across from it. That side is c.

  2. Square what you know. Multiply each known side by itself.

  3. Add or subtract. Looking for the long side, add. Looking for a short side, subtract the smaller square from the larger one.

  4. Take the square root. That undoes the squaring and leaves the actual length. You can check any root on the square root calculator.

See a worked example: sides of 3 and 4 — the classic triangle
Leg a
3
Leg b
4

Square both: 3 × 3 = 9, and 4 × 4 = 16.

Add them: 9 + 16 = 25.

Take the square root of 25, which is 5.

So the triangle is 3, 4, 5. Because all three sides are whole numbers, builders use this one constantly to check a corner is square.

The hypotenuse is 5

Frequently asked questions

Problems people actually run into

Adding when you should subtract

When you already know the hypotenuse and want a short side, the arithmetic reverses: you subtract rather than add.

The tell is that your answer is larger than the hypotenuse, which is impossible. If that happens, you added instead of subtracting.

Results are estimates for general information only and are not professional financial, medical, or legal advice. Read our full disclaimer.

Last updated: August 29, 2026