Pythagorean Theorem Calculator
Solve any side of a right triangle using a² + b² = c². Enter the two known sides, choose which one to find, and the calculator will handle the rest — including exact radical form for non-perfect-square results.
How the Pythagorean Theorem Calculator Works — and Why a 2,500-Year-Old Formula Still Matters
The Pythagorean theorem is one of the oldest and most useful results in all of mathematics. It says that in any right triangle — a triangle with one 90-degree angle — the square of the longest side (called the hypotenuse) equals the sum of the squares of the other two sides. Written as a formula: a² + b² = c², where c is the hypotenuse and a and b are the two shorter legs. It was known to Babylonian mathematicians over a thousand years before Pythagoras was born, and it's been in continuous use ever since — in architecture, navigation, physics, computer graphics, and countless other fields.
The formula and how to use it
The formula is simple, but it works in three different directions depending on which side you're trying to find. If you know both legs and want the hypotenuse, rearrange to c = √(a² + b²). If you know the hypotenuse and one leg and want the other leg, rearrange to a = √(c² − b²). The calculator figures out which case applies based on which field you leave blank, so you don't have to do the algebra yourself. Just enter the two known sides and the result appears instantly.
Pythagorean triples — the “nice” answers
Most of the time, the answer to a Pythagorean problem involves a square root that doesn't simplify to a whole number. But sometimes it does. When all three sides are whole numbers, we call them a Pythagorean triple. The most famous is 3-4-5: a triangle with legs 3 and 4 has a hypotenuse of exactly 5, because 3² + 4² = 9 + 16 = 25 = 5². Other common triples include 5-12-13, 8-15-17, and 7-24-25. Any multiple of a triple is also a triple — so 6-8-10, 9-12-15, and 30-40-50 all work. Builders, carpenters, and surveyors have used the 3-4-5 triangle for thousands of years to create perfect right angles on construction sites, because it's easy to measure out with nothing more than a tape or rope.
Where it shows up in real life
The Pythagorean theorem is one of those rare mathematical results that's used every single day, often without people realizing it. Construction uses it to square corners and compute the length of roof rafters. Navigation and GPS use it to calculate the shortest distance between two points, especially when the path crosses at right angles. Computer graphics and video games use it to compute distances between pixels or objects on screen, millions of times per second. Physics uses it to combine perpendicular vectors — like when you add a northward velocity and an eastward velocity to get a total speed. And television screens and monitors are sized by their diagonal, which is the hypotenuse of the rectangle — a 55-inch TV measures 55 inches corner to corner.
Limitations to keep in mind
The Pythagorean theorem only applies to right triangles. If your triangle doesn't have a 90-degree angle, you need the law of cosines, which is a generalization that reduces to the Pythagorean theorem when one angle is 90 degrees. There's also the converse of the theorem: if a² + b² = c² holds for the three sides of a triangle, then the triangle must be a right triangle — a fact sometimes used to test whether a triangle is right-angled. Finally, keep in mind that the calculator assumes your triangle is a right triangle (because the theorem only works in that case) and that its sides are straight lines in flat, two-dimensional space. On a curved surface — like the Earth — the relationship no longer holds exactly, which is why long-distance navigation uses spherical trigonometry instead.