Calculators

Pythagorean Theorem Calculator

Find the missing side of a right triangle from the other two sides using a² + b² = c², with the working shown.

Loading interactive tool…

Embed this tool on your site

About this tool

The Pythagorean theorem says that in a right triangle the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². This calculator finds whichever side you leave blank. Enter both legs to get the hypotenuse, c = √(a² + b²), or enter the hypotenuse and one leg to get the other leg, for example b = √(c² − a²). The answer appears as you type with each line of the working: the formula, the numbers substituted, the squares, and the square root. The tool also reports the triangle's area (½ab), perimeter and the two acute angles in degrees, and a labelled diagram shows which side is which. Any unit works as long as all sides use the same one. If the hypotenuse is not longer than the leg you entered, the calculator explains why no right triangle exists. Everything runs in your browser.

Why use it

  • Solves for any side: hypotenuse from two legs, or a leg from the hypotenuse and the other leg.

  • Shows each step of a² + b² = c², from substitution to the square root, ready to copy into homework.

  • Extra results: area, perimeter and both acute angles come with every answer.

  • Clear errors: impossible inputs, such as a hypotenuse shorter than a leg, are explained instead of returning nonsense.

  • Instant and private, with no sign-up and nothing uploaded.

How to use

  1. Enter the two sides you know: legs a and b, or the hypotenuse c and one leg.
  2. Leave the side you want to find blank.
  3. Read the missing side and the step-by-step working in the result panel.
  4. Use the area, perimeter and angle results if your problem asks for them.

When it helps

  • Finding a ladder length or ramp length from the rise and run.
  • Checking that a corner is square: a 3-4-5 measurement should give exactly 5.
  • Measuring a TV or screen diagonal from its width and height.
  • Solving geometry and trigonometry homework on right triangles.

Examples

Hypotenuse from two legs

Input

a = 3, b = 4

Expected result

c = √(9 + 16) = √25 = 5; area 6; angles 36.8699° and 53.1301°

Missing leg

Input

a = 5, c = 13

Expected result

b = √(169 − 25) = √144 = 12; perimeter 30

Decimal sides

Input

b = 1.5, c = 2.5

Expected result

a = √(6.25 − 2.25) = √4 = 2

Tips

  • Common whole-number right triangles (Pythagorean triples) include 3-4-5, 5-12-13, 8-15-17 and 7-24-25; multiples such as 6-8-10 work too.
  • To check a corner is square, measure 3 units along one side and 4 along the other; the diagonal should be 5.
  • If your answer looks too small, make sure you entered the longest side as c, not as a leg.

Frequently Asked Questions

What is the Pythagorean theorem?
For any right triangle with legs a and b and hypotenuse c, a² + b² = c². The hypotenuse is the side opposite the right angle and is always the longest side.
How do I find the hypotenuse?
Square both legs, add them and take the square root: c = √(a² + b²). With legs 3 and 4, c = √(9 + 16) = √25 = 5.
How do I find a missing leg?
Subtract the square of the known leg from the square of the hypotenuse and take the square root: b = √(c² − a²). With a = 5 and c = 13, b = √(169 − 25) = √144 = 12.
Does it work for triangles without a right angle?
No. The theorem only applies to right triangles. For other triangles use the Triangle Solver, which applies the Law of Cosines and Law of Sines.
What units should I use?
Any unit, as long as every side uses the same one. The answer is in that unit, and the area is in that unit squared.
Why do I get an error when I enter all three sides?
The calculator solves for one unknown side, so it needs exactly two values. Clear the side you want it to calculate.
How are the angles calculated?
The angle opposite leg a is atan(a ÷ b), converted to degrees, and the other acute angle is 90° minus that. The third angle is the 90° right angle.

Explore the category

Glossary

Hypotenuse
The side opposite the right angle in a right triangle; always the longest side.
Leg
Either of the two shorter sides that form the right angle.
Pythagorean triple
Three whole numbers that satisfy a² + b² = c², such as 3, 4 and 5.
A LITTLE HELP. A LOT DONE.
Good tools.
Great flow.

Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.

✓ Free to use✓ No sign-up✓ 500+ possibilities