Pythagorean Theorem Calculator
Find sides of a right triangle easily
What Is the Pythagorean Theorem Calculator?
The Pythagorean theorem relates the three sides of a 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, called the legs. This calculator solves for any one side given the other two, covering all three variations of the formula.
The relationship is traditionally credited to the ancient Greek mathematician Pythagoras (c. 570–495 BC), but the underlying pattern was known and used far earlier — the Babylonian clay tablet known as Plimpton 322, dated to around 1800 BC, lists numerous sets of whole-number side lengths that satisfy the relationship (now called Pythagorean triples), suggesting the pattern was recognized more than a thousand years before Pythagoras's lifetime. What's generally attributed to Pythagoras and his followers is the first known general proof, rather than the discovery of the pattern itself.
This theorem is also the basis of the distance formula in coordinate geometry — for related straight-line distance and slope problems, see the Slope Calculator. For finding the area of a triangle once you know its sides, the Triangle Area Calculator is a natural next step.
Pythagorean Theorem Calculator Formula
a² + b² = c²
c = hypotenuse, a and b = the two legs of the right triangle
How Is the Pythagorean Theorem Calculator Calculated?
Rearranging a² + b² = c² lets you solve for any one side as long as you know the other two — take the square root of the sum (for the hypotenuse) or the difference (for a leg) of the squared known sides.
Geometrically, a² + b² = c² can be visualized as three squares built on each side of the right triangle: the areas of the two smaller squares (built on the legs) always add up exactly to the area of the largest square (built on the hypotenuse). This area-based interpretation is how most classical proofs of the theorem — including several attributed to Pythagoras's school — were originally constructed, well before algebraic notation existed to write the formula as it's shown here.
Pythagorean Theorem Calculator Example
For legs 3 and 4: c = √(3² + 4²) = √25 = 5 — the classic 3-4-5 right triangle.
For legs 5 and 12: c = √(5² + 12²) = √(25 + 144) = √169 = 13 — another whole-number Pythagorean triple.
Solving for a leg: given hypotenuse 10 and leg 6, the missing leg = √(10² − 6²) = √(100 − 36) = √64 = 8 — this is the same 6-8-10 triangle as the 3-4-5 triple, scaled up by a factor of 2.
How to Use the Pythagorean Theorem Calculator
Step 1
Select what you want to find: the hypotenuse, or one of the two legs.
Step 2
Enter the two known side lengths.
Step 3
Click Calculate to see the missing side.
Step 4
Double-check that your triangle actually has a 90-degree angle before applying the result.
Step 5
Compare your result against a known Pythagorean triple (like 3-4-5) if you want a quick sanity check.
Step 6
Use the Triangle Area calculator next if you also need the area, not just the missing side.
Benefits
- Turns your solved triangle into a branded image card you can send straight to a group chat or classmate.
- Solves for any of the three sides depending on what you already know.
- Shows the exact formula variant used for your selected mode.
- Precise results even for irrational side lengths.
- Removes the risk of a sign error when rearranging the formula to solve for a leg by hand.
- Free, instant, and works entirely in your browser.
Common Pythagorean Theorem Calculator Scenarios
Scenario 1
Finding the diagonal length of a rectangle, screen, or door frame.
Scenario 2
Construction and carpentry for checking right angles and diagonal bracing.
Scenario 3
Navigation and physics problems involving straight-line distance.
Scenario 4
Calculating the shortest straight-line distance between two points on a grid or map.
Scenario 5
Checking whether a triangle you've measured is actually a right triangle, by seeing if a² + b² = c² holds.
Scenario 6
Sizing a TV, monitor, or ladder based on its diagonal measurement versus wall or floor space.
Understanding Your Result
The result is the length of the missing side of your right triangle, using the same units as your inputs. Many right triangles produce irrational results, so the decimal shown is often an approximation.
If your two known sides happen to form part of a Pythagorean triple — like 3-4-5, 5-12-13, or 8-15-17 — the missing side will come out as an exact whole number instead. Any multiple of a known triple (like 6-8-10, which is the 3-4-5 triple doubled) will also produce a clean whole-number result, which is a useful pattern to recognize when checking your work by hand.
Tips
- The 3-4-5 triangle (and its multiples, like 6-8-10) is a handy way to verify a right angle without a calculator.
- The hypotenuse is always the longest side and is always opposite the right angle.
- Make sure you're solving for the correct missing side using the right mode.
- Memorize a couple of common triples (3-4-5, 5-12-13) to spot-check calculator results quickly.
- Remember the theorem only applies to right triangles — for other triangle shapes, you need the Law of Cosines instead.
Common Mistakes
- Applying the theorem to a triangle that isn't actually a right triangle.
- Mixing up which side is the hypotenuse when solving for a leg instead.
- Subtracting the squares in the wrong order when solving for a leg, which would produce an invalid (negative) result under the square root.
- Forgetting to take the square root at the end, leaving the answer as the squared value instead of the actual side length.
- Assuming any triangle with a large angle is automatically a right triangle without confirming it measures exactly 90 degrees.
Frequently Asked Questions
Does this only work for right triangles?
Yes, the Pythagorean theorem applies specifically to right triangles — triangles with one 90-degree angle. For other triangle types, formulas like the Law of Cosines are needed instead.
Where is the Pythagorean theorem used?
It's widely used in construction, navigation, physics, and computer graphics to calculate distances, diagonal lengths, and right-angle checks — it's also the mathematical basis of the distance formula in coordinate geometry.
What if my calculated value is not a whole number?
That's normal — many right triangles have irrational side lengths. The calculator rounds to 4 decimal places for readability, and the true value is a non-terminating decimal.
Which side is the hypotenuse?
The hypotenuse is always the longest side of a right triangle, located directly opposite the 90-degree angle.
What are "Pythagorean triples"?
These are sets of three whole numbers that satisfy a² + b² = c² exactly, like 3-4-5, 5-12-13, and 8-15-17 — useful for quick mental checks, and any whole-number multiple of a triple is also a valid triple.
Can this theorem be used for triangles that aren't right triangles?
No — the Pythagorean theorem specifically applies only to right triangles (triangles with one 90-degree angle); other triangle types require different formulas, like the Law of Cosines, which generalizes this relationship to any triangle.
Who discovered the Pythagorean theorem?
It's traditionally credited to Pythagoras, but Babylonian tablets dated to roughly 1800 BC — over a thousand years earlier — already list numerous whole-number side lengths satisfying the relationship, so the pattern itself predates Pythagoras considerably; what's generally credited to him is an early general proof.
How do I know which side is the hypotenuse?
The hypotenuse is always the longest side of a right triangle, and it's always opposite the right angle (the 90-degree corner).
What if my calculated side length comes out as a decimal?
That's completely normal — most real-world right triangles don't have whole-number side lengths, so a decimal or irrational result is expected unless your triangle happens to be a Pythagorean triple.
Can I share my result as an image?
Yes — tap Share and, on supported devices, your result is shared as a branded image card, not just a text link.
How can I check if three given side lengths actually form a right triangle?
Square the two shorter sides, add them together, and compare to the square of the longest side — if they're equal, the triangle is a right triangle; if not, it isn't, regardless of how close the angle looks visually.
What's the difference between a leg and the hypotenuse?
The two legs are the sides that form the right angle itself, while the hypotenuse is the third side connecting their endpoints, always opposite the right angle and always the longest of the three sides.
Can the Pythagorean theorem be extended beyond two dimensions?
Yes — the 3D distance formula extends the same idea to three coordinates (x, y, z), computing straight-line distance as √(a² + b² + c²), which is used in fields like 3D graphics and physics.
References
Important Information
Results are rounded to 4 decimal places for irrational side lengths.
Last updated: July 25, 2026