Pythagorean Theorem Calculator
Solve a² + b² = c² instantly — find the hypotenuse or a missing leg of a right triangle, with the working, angles, perimeter and area.
c = —
- Side a
- —
- Side b
- —
- Hypotenuse c
- —
- Perimeter
- —
- Area
- —
- Angle A (opposite a)
- —
- Angle B (opposite b)
- —
- Angle C
- 90°
How it works
The Pythagorean theorem says that in any right-angled triangle the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². Enter the two sides you know and the missing one appears instantly. To find the hypotenuse the tool computes c = √(a² + b²); to find a missing leg it rearranges the formula to a = √(c² − b²), which only has an answer when the hypotenuse is longer than the leg you entered — the longest side of a right triangle is always the hypotenuse.
Alongside the missing side you get the full triangle: perimeter (a + b + c), area (a × b ÷ 2) and both acute angles, found with the arctangent of the opposite side over the adjacent side and rounded to two decimals. The scale drawing updates with your numbers so you can sanity-check the shape at a glance. Every calculation runs in JavaScript in your browser — nothing is uploaded, there is no sign-up and there are no ads. Copy the results or download them as a plain text file.
Frequently asked questions
How do you find the hypotenuse of a right triangle?
Square both legs, add them together and take the square root: c = √(a² + b²). For legs of 3 and 4 that is √(9 + 16) = √25 = 5. Choose "Hypotenuse c" at the top of the calculator, type the two legs and the answer appears as you type, with each step of the working printed underneath.
How do I find a missing leg when I know the hypotenuse?
Rearrange the theorem to a = √(c² − b²). With a hypotenuse of 13 and one leg of 5 you get √(169 − 25) = √144 = 12. Pick "Leg a" or "Leg b" in the dropdown and enter the hypotenuse and the leg you know. If the hypotenuse is not longer than that leg the triangle is impossible, and the calculator says so instead of returning a result.
Does the Pythagorean theorem work for any triangle?
No — it only holds for right-angled triangles, where one angle is exactly 90°. For triangles without a right angle you need the law of cosines instead. You can also use the theorem in reverse as a check: if a² + b² equals c² for the three sides you measured, the triangle is right-angled; if the sum is larger the triangle is acute, and if it is smaller the triangle is obtuse.