How do you solve the Pythagorean theorem?
Square the two sides you know, add them for the hypotenuse or subtract for a leg, then take the square root. For legs 3 and 4: 9 + 16 = 25, and √25 = 5.
By Mateo Díaz · Last updated: July 19, 2026
Pythagorean theorem calculator
Tap a side to solve for it - the dashed side is the one being calculated.
- Hypotenuse c
- 5
- Perimeter
- 12
- Area
- 6
- Angle opposite leg a
- 36.87°
- Angle opposite leg b
- 53.13°
c = √(3² + 4²) = √25 = 5
The full answer
The three steps
- Write the formula and substitute the two sides you know.
- Square them, then add if you are finding the hypotenuse or subtract if you are finding a leg.
- Take the square root of the result.
Finding the hypotenuse from legs 3 and 4:
Finding a leg from hypotenuse 13 and leg 5:
Which version to use
| You know | You want | Do this |
|---|---|---|
| Both legs | Hypotenuse | Add the squares, then root |
| One leg and the hypotenuse | The other leg | Subtract the leg square from the hypotenuse square, then root |
When subtracting, the hypotenuse square always comes first - it is the longest side, so its square is the biggest number. If your subtraction goes negative, the side you called the hypotenuse is not actually the hypotenuse.
The mistakes that cost marks
| Mistake | Why it fails | Fix |
|---|---|---|
| Adding before squaring | , not | Square each side separately, then add |
| Adding when solving for a leg | Gives a side longer than the hypotenuse | Subtract from the hypotenuse square |
| Mixing units | Feet on one side, inches on the other | Convert everything to one unit first |
| Forgetting the square root | Leaves you with , not | The last step is always the root |
When it does not apply
The theorem only works when the triangle has a 90° angle. For any other triangle you need the law of cosines, which adds a correction term for the actual angle.