Skip to the calculator
SwiftSums
Math & statistics

Pythagorean Theorem Calculator. Solve for any side.

Enter the two sides you know and pick the one you want. The formula rearranges itself and shows the working with your numbers in it.

Live calculation

Which side are you missing?

What are you finding? The side you pick becomes the answer; the other two become inputs.
Units are whatever you enter — the ratio is what matters.
Hypotenuse c 5
Perimeter
12
Area
6
Triangle
Scalene right

c = √(a² + b²)
c = √(3² + 4²) = √25 = 5

Your figures are kept on this device only.

How it works

In any right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides. That single relationship rearranges three ways depending on which side is missing.

c = √(a² + b²)  — finding the hypotenuse
a = √(c² − b²)  — finding a leg
b = √(c² − a²)  — finding the other leg

When solving for a leg, the hypotenuse must be the longest side. Enter a leg longer than c and the value under the square root goes negative — no such triangle exists, so the calculator says so rather than returning a meaningless number.

Worked example

A 3–4–5 triangle, the smallest whole-number right triangle.

Step by step
  1. Square each known leg: 3² = 9 and 4² = 16.
  2. Add them: 9 + 16 = 25.
  3. Take the square root: √25 = 5.

The hypotenuse is 5.

Common questions

Does this work for any triangle?

No — only right triangles, meaning one angle is exactly 90°. For other triangles you need the law of cosines, which generalises this relationship by adding a term for the angle between the two known sides.

Which side is the hypotenuse?

The one opposite the right angle, and always the longest of the three. If you are unsure which of your measurements it is, it is the longest one.

What is a Pythagorean triple?

Three whole numbers that satisfy the relationship exactly — 3–4–5, 5–12–13 and 8–15–17 are the common ones. Any multiple of a triple is also a triple, so 6–8–10 works as well.