Pythagorean theorem calculator
Find a missing side of a right triangle from the other two. Students, builders and DIYers use it to check that corners are square and to work out diagonal lengths.
- Runs in your browser
- Free, no account needed
- Copy or download the result
Result
The short answer
In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs. To find a missing leg, subtract the square of the known leg from the square of the hypotenuse and take the square root.
Formulaa^2 + b^2 = c^2, so c = sqrt(a^2 + b^2) and a = sqrt(c^2 - b^2)
Worked exampleLegs of 3 and 4 give c = sqrt(3^2 + 4^2) = 5, an area of 6, a perimeter of 12 and angles of 36.86989765 and 53.13010235 degrees.
Example
- Leg a
- 3
- Leg b
- 4
- Hypotenuse c
- Leg a
- 3
- Leg b
- 4
- Area
- 6
- Perimeter
- 12
- Angle A, across from a
- 36.86989765°
- Angle B, across from b
- 53.13010235°
- Formula
- c = √(3² + 4²)
Lengths are rounded to 12 significant digits.
How to use the pythagorean theorem calculator
- Fill in two of Leg a, Leg b and Hypotenuse c, and leave the unknown side blank.
- The missing side appears first. Results update as you type, and Run also works.
- Read the area, perimeter, angles and formula under the result.
- Press Copy result or Download to keep the answer.
How it works
The theorem says a² + b² = c², where c is the hypotenuse across from the right angle. So c = √(a² + b²) and a leg = √(c² - other leg²).
Exactly two sides must be filled in, and each must be greater than zero. The hypotenuse must be longer than the leg you give.
When the inputs are whole numbers, a missing side that is not whole is also shown as a simplified radical, such as √2.
Area is a x b / 2, and the two acute angles come from the arctangent. Lengths are rounded to 12 significant digits.
Everything runs in your browser. Your input is not uploaded or stored. If you use Copy link, what you entered is placed in the link.
Questions and answers
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².
How do I find a leg if I know the hypotenuse?
Subtract the square of the known leg from the square of the hypotenuse and take the square root. With c = 13 and a = 5, b = √(169 - 25) = 12.
What is a 3-4-5 triangle?
It is a right triangle with whole number sides 3, 4 and 5. Builders use it to check that a corner is exactly 90 degrees.
Last updated November 1, 2026. Maintained by SnowRock. How our tools work
All 220 SnowRock tools