The Pythagorean theorem states that in 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². Here a and b are the two legs that meet at the right angle, and c is the hypotenuse, the longest side sitting opposite that angle. The relationship is one of the oldest and most useful rules in geometry, and it links the three sides so tightly that knowing any two of them fixes the third. If you know both legs, the hypotenuse is c = √(a² + b²). If you know the hypotenuse and one leg, the missing leg is b = √(c² − a²). Because the hypotenuse is always the longest side, c must be greater than either leg — otherwise no right triangle can exist. The math is simple enough to do by hand for clean triples, and for every other pair of lengths a free Pythagorean Theorem Calculator handles the arithmetic, the area, the perimeter, and the angles in one step.

What the Pythagorean Theorem Actually Says
The theorem is a single equation: a² + b² = c². The letters don't have to be a, b, and c — any two legs and the hypotenuse of a right triangle will satisfy that relationship. Two of the sides, the legs, share the right angle, and the third side, the hypotenuse, stretches across from one leg to the other and is always the longest.
The rule was first written down that way. Euclid recorded it as Proposition 47 of Book I of the Elements, building on earlier work attributed to Pythagoras and his school in the sixth century BCE. It is one of the oldest mathematical results with a name attached to it, and it remains a foundation of geometry, trigonometry, and coordinate algebra.
The single condition that makes the formula work is the right angle. a² + b² = c² is true for any right triangle, but only for right triangles. If the largest angle isn't 90°, the equation no longer holds, and you need a different rule — the Law of Cosines — to relate the sides. That said, the Law of Cosines collapses back into the Pythagorean theorem the moment its angle is exactly 90°, because cos(90°) is 0.
When You'd Actually Use the Pythagorean Theorem
The theorem shows up anywhere a right angle hides inside a practical problem. Builders use it to square up walls and to mark a true 90° corner on a slab by measuring three units along one side, four units along the other, and checking that the diagonal comes out to exactly five. Surveyors use it to combine north–south and east–west distances into a straight-line distance across the ground. The diagonal of any rectangle — from a sheet of plywood to a TV screen — comes straight from the same formula, which is why a 55-inch TV lists a width and a height that also satisfy a² + b² = 55².
It is also the basis of the distance formula in coordinate geometry. The straight-line distance between two points (x₁, y₁) and (x₂, y₂) is √((x₂−x₁)² + (y₂−y₁)²), which is just a² + b² = c² in disguise. Game developers rely on the same identity whenever an in-game object needs to know how far away something is along a grid, and navigators use it to turn a bearing and a distance into a position on a map.
How to Figure Out a Right Triangle's Missing Side
The fastest way to apply the theorem is to use a purpose-built calculator rather than pencil and paper. The Pythagorean Theorem Calculator accepts any two sides you already know and solves for the third. Here is the exact sequence of steps.
- Choose whether you need the hypotenuse or a missing leg. Pick "Find hypotenuse" when you have both legs and want c; pick the leg option when you have the hypotenuse and one leg and want the other leg.
- Type the two lengths you already know into the matching input boxes. Use any units you like, but keep both sides in the same unit — feet with feet, meters with meters, inches with inches — or the answer will mix units silently.
- Read the missing side the moment it appears. The result updates every time you change an input, so you can experiment with different values and watch the triangle respond in real time.
- Check the extras below the answer. The calculator also reports the area (½ · a · b), the perimeter (a + b + c), and both acute angles, which it works out with the arctangent and which always add up to 90°.
- Look at the formula line printed with the answer. The working is shown as something like c = √(a² + b²) so you can follow each step instead of trusting a black box, and numbers are rounded to a readable number of decimal places while still preserving enough precision to verify exact triples.
You can open the tool at the Pythagorean Theorem Calculator and try it on any two sides you have on hand.
Pythagorean Triples Worth Memorizing
Some side triples are so clean they are worth keeping in your head. Because 3² + 4² = 5² (9 + 16 = 25), any whole-number multiple of a 3-4-5 triple is also a right triangle. The same is true for several other small-integer triples that show up constantly in textbooks and on construction sites. The table below lists the most common ones, all of them known Pythagorean triples whose identity you can verify at a glance.
| Triple | Identity | Scaled examples |
|---|---|---|
| 3-4-5 | 3² + 4² = 9 + 16 = 25 = 5² | 6-8-10, 9-12-15, 30-40-50 |
| 5-12-13 | 5² + 12² = 25 + 144 = 169 = 13² | 10-24-26, 15-36-39 |
| 8-15-17 | 8² + 15² = 64 + 225 = 289 = 17² | 16-30-34, 24-45-51 |
| 7-24-25 | 7² + 24² = 49 + 576 = 625 = 25² | 14-48-50, 21-72-75 |
| 9-40-41 | 9² + 40² = 81 + 1600 = 1681 = 41² | 18-80-82 |
Seeing these come out exactly when you feed the three numbers into the calculator is a quick way to confirm the tool is behaving correctly, and they show up constantly in geometry homework and on real construction sites.
Worked Example With a 3-4-5 Triangle
Suppose a builder is checking that a corner is square and measures 3 feet along one wall and 4 feet along the other. What should the diagonal read if the corner is a true right angle?
Start with the formula for the hypotenuse: c = √(a² + b²). Substitute a = 3 and b = 4:
c = √(3² + 4²) = √(9 + 16) = √25 = 5
The diagonal should measure exactly 5 feet. If it does, the corner is square. The area of the same triangle is ½ · a · b = ½ · 3 · 4 = 6 square feet, and the perimeter is a + b + c = 3 + 4 + 5 = 12 feet. The two acute angles work out to atan(3/4) ≈ 36.87° and atan(4/3) ≈ 53.13°, which sum to 90° as expected. The Pythagorean Theorem Calculator returns all of these together without the manual arithmetic.
Limits of the Formula and Common Pitfalls
The Pythagorean theorem has one hard requirement: the triangle must be right-angled. If the largest angle is anything other than 90°, a² + b² = c² no longer holds and you need the Law of Cosines instead: c² = a² + b² − 2ab · cos(C). When angle C is 90°, cos(C) is 0 and the Law of Cosines collapses back to the Pythagorean theorem, which is why the two are consistent rather than competing.
Because the hypotenuse is always the longest side, any input where c would end up shorter than a leg is impossible — no right triangle can have those dimensions. The Pythagorean Theorem Calculator checks that for you and flags inputs where the hypotenuse would be shorter than a leg, so you know right away that the numbers don't describe a real triangle rather than silently producing a meaningless result.
A second pitfall is mixing units. If you enter one side in feet and the other in inches, the result will be in a mixed-unit square and the geometry will quietly give a wrong answer. Use the same unit on both legs (and on the hypotenuse if you're solving for a leg), then convert afterward if you need to.
For the missing side, the area, the perimeter, and both acute angles in a single view, the Pythagorean Theorem Calculator computes everything locally in your browser, with nothing uploaded and the formula line shown so you can follow each step.