Pythagorean Theorem Calculator
Choose whether you need the hypotenuse or a missing leg, then enter the two sides you know. The calculator also gives the area, perimeter and both acute angles of the right triangle.
- Free, no sign-up
- Updated
- Formula and worked example
Enter your numbers to see the result.
- Find the hypotenuse
- Find a missing leg
- Area and perimeter
- Acute angles in degrees
The Pythagorean theorem
In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides:
a² + b² = c²
The hypotenuse c is the longest side and sits opposite the right angle. The sides a and b are the legs. The theorem only works for right triangles.
| You know | Find | Formula |
|---|---|---|
| Both legs a and b | Hypotenuse c | c = √(a² + b²) |
| Leg a and hypotenuse c | Leg b | b = √(c² − a²) |
Worked examples
Legs 3 and 4: c = √(9 + 16) = √25 = 5. Leg 5 and hypotenuse 13: b = √(169 − 25) = √144 = 12. Whole-number triples like 3-4-5, 5-12-13 and 8-15-17 are called Pythagorean triples.
Where people use it
Builders use it to check that a corner is square: if the sides measure 3 and 4 units, the diagonal should be 5. It also gives the straight-line distance between two points on a grid and the length of a ladder needed to reach a given height.
Common mistakes
Using a leg as the hypotenuse. The hypotenuse is always the longest side, so it must be larger than either leg. Forgetting the square root. a² + b² gives c², not c. Using it on a triangle without a right angle. The theorem does not apply. For other equation types try the quadratic formula calculator.
Frequently asked questions
What is the formula for the Pythagorean theorem?
a² + b² = c², where c is the hypotenuse of a right triangle and a and b are the two legs.
How do I find a missing leg?
Subtract the square of the known leg from the square of the hypotenuse, then take the square root. For c = 13 and a = 5, b = √(169 − 25) = 12.
Does the theorem work for every triangle?
No. It works only for right triangles, which have one 90 degree angle.
What is a Pythagorean triple?
It is a set of three whole numbers that satisfy a² + b² = c², such as 3, 4, 5 or 5, 12, 13.
More calculators you may need
- Scientific Calculator A free scientific calculator that runs in your browser. Use the keypad or your keyboard for tri...
- Quadratic Formula Calculator Enter the coefficients a, b and c of a quadratic equation. You get both roots, whether they are...
- Linear Equation Solver Enter a, b and c for an equation of the form ax + b = c. The solver shows the answer for x, eac...
- Mean Median Mode Calculator Paste or type a list of numbers separated by commas or spaces. You get the mean, median, mode...