Pythagorean Theorem Calculator
Enter any two sides — leg a, leg b, or hypotenuse c — and the third appears instantly, along with the steps, area, and perimeter.
Enter any two of the three sides to find the third
Tap a card to copy the number
Show the steps
The Pythagorean theorem, in one line
For any right triangle — a triangle with one 90° angle — the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². The two shorter sides that meet at the right angle are called the legs (a and b); the longest side, opposite the right angle, is the hypotenuse (c). Because the relationship is an equality, knowing any two of the three sides is enough to solve for the third — no protractor or trigonometry required.
How the calculator solves each case
Enter any two of the three fields and the calculator fills in the third automatically:
- Hypotenuse from two legs: c = √(a² + b²)
- A leg from the hypotenuse and the other leg: a = √(c² − b²), or b = √(c² − a²)
- Area = ½ × a × b (the two legs are always perpendicular, so they double as base and height)
- Perimeter = a + b + c
If you type in all three sides at once, the calculator switches to verify mode: it checks whether a² + b² actually equals c² and tells you immediately whether the three lengths you have describe a genuine right triangle. Because the hypotenuse is always the longest side by definition, the calculator also flags the case where a length entered as c isn't actually longer than the other leg — that usually means the wrong side was labeled as the hypotenuse.
Example 1 — two legs, find the hypotenuse. Legs of 6 and 8: c = √(6² + 8²) = √(36 + 64) = √100 = 10. Area = ½ × 6 × 8 = 24. Perimeter = 6 + 8 + 10 = 24.
Example 2 — hypotenuse and one leg, find the other leg. Hypotenuse 17, one leg 8: the other leg = √(17² − 8²) = √(289 − 64) = √225 = 15 — the 8-15-17 triple. Since 17 > 8 the numbers check out; if 8 had been entered as the hypotenuse instead, the calculator would flag the mismatch.
Example 3 — verifying three known sides. Sides 7, 24, and 25: 7² + 24² = 49 + 576 = 625, and 25² = 625 — they match, so it's a valid right triangle (area 84, perimeter 56). Sides 7, 24, and 26 would fail the same check (625 ≠ 676), confirming that triangle isn't right-angled.
Common Pythagorean triples
A Pythagorean triple is a set of three positive integers that satisfies a² + b² = c² exactly, so every side comes out as a whole number. The table below lists the smallest ("primitive") triples — any whole-number multiple of a row (like 6-8-10, which is 3-4-5 doubled) is also a valid triple:
| a | b | c | Check |
|---|---|---|---|
| 3 | 4 | 5 | 9 + 16 = 25 |
| 5 | 12 | 13 | 25 + 144 = 169 |
| 8 | 15 | 17 | 64 + 225 = 289 |
| 7 | 24 | 25 | 49 + 576 = 625 |
| 20 | 21 | 29 | 400 + 441 = 841 |
| 9 | 40 | 41 | 81 + 1600 = 1681 |
| 12 | 35 | 37 | 144 + 1225 = 1369 |
Where this shows up in real life
- Construction and carpentry: the 3-4-5 triple is the classic way to square a corner — measure 3 units along one wall, 4 along the other, and the diagonal between those marks should be exactly 5 units if the corner is a true right angle.
- Screens and diagonals: a display's advertised size is the diagonal (the hypotenuse) of its width and height — the same formula that finds a missing triangle side also finds a screen's diagonal.
- Navigation and distance: the straight-line ("as the crow flies") distance between two points that differ in both an east-west and a north-south direction is the hypotenuse of those two differences.
Sources & further reading
Frequently asked questions
What is the Pythagorean theorem formula?
The Pythagorean theorem states that in any right triangle, the square of the hypotenuse (the longest side, opposite the right angle) equals the sum of the squares of the other two sides: a² + b² = c². It only applies to right triangles — triangles with one 90° angle. Named after the ancient Greek mathematician Pythagoras, it's one of the most widely used relationships in geometry, construction, navigation, and engineering, letting you find any one side of a right triangle as long as you know the other two.
How do I find the hypotenuse if I know both legs?
Square each leg, add the results together, then take the square root: c = √(a² + b²). For example, with legs of 3 and 4, c = √(3² + 4²) = √(9 + 16) = √25 = 5 — the classic 3-4-5 triangle. This calculator does the substitution automatically and shows every step, so you can enter your own two leg lengths and get the hypotenuse, area, and perimeter instantly.
How do I find a missing leg if I know the hypotenuse and one leg?
Square the hypotenuse, subtract the square of the known leg, then take the square root: a = √(c² − b²). For example, with a hypotenuse of 13 and a known leg of 5, a = √(13² − 5²) = √(169 − 25) = √144 = 12. The hypotenuse must always be the longest side — if the length you entered as c isn't greater than the other leg, the calculator will flag it so you can check which side is really the hypotenuse.
What are common Pythagorean triples?
A Pythagorean triple is a set of three positive whole numbers that satisfy a² + b² = c² exactly, so the sides come out as neat integers instead of decimals. The most common ones are 3-4-5, 5-12-13, 8-15-17, 7-24-25, and 20-21-29, along with any whole-number multiple of them (like 6-8-10 or 9-12-15). Tap one of the preset buttons above to load a triple and see it verified instantly, or check the reference table further down the page for more examples.
Can this calculator check whether three sides form a right triangle? Is my data sent to a server?
Yes — enter all three sides at once and the calculator checks whether a² + b² = c² holds, telling you immediately if they form a valid right triangle or not, along with the area and perimeter when they do. And no, nothing is sent anywhere: this tool runs entirely in your browser, the numbers you type never leave your device, and there's no sign-up, tracking, or server storage involved.