Pythagorean Theorem Calculator
Find the hypotenuse or a missing leg of any right triangle, with every step of a² + b² = c² shown.
Last updated
How to use pythagorean theorem calculator
- Choose “Find the hypotenuse (c)” when you know both legs, or “Find a missing leg (b)” when you know one leg and the hypotenuse.
- Type the known sides into the two fields — the solved side appears as you type.
- Read the result to two decimals, with the a² + b² = c² substitution shown beneath it.
- The result clears when a field is empty and warns when the hypotenuse is not the longest side.
Examples
Classic 3-4-5 triangle
Enter a = 3 and b = 4 in hypotenuse mode: 3² + 4² = 9 + 16 = 25, so c = √25 = 5.00 — the best-known Pythagorean triple.
Ladder 5 m up, 12 m out
A ladder reaching 5 m up a wall with its foot 12 m away has length √(25 + 144) = √169 = 13.00 m — the 5-12-13 triple.
Missing leg: 8 and 17
Switch to leg mode and enter a = 8, c = 17: b² = 289 − 64 = 225, so b = 15.00 — the 8-15-17 triple.
What is Pythagorean Theorem?
A ladder leans against a wall. If its foot sits three metres from the base and it reaches four metres up, how long is the ladder? Five metres — and you can know that without measuring the ladder at all, because the right angle between wall and ground makes the three sides obey a fixed rule. The Pythagorean theorem states that in any right triangle, the square of the hypotenuse — the side opposite the right angle, always the longest — equals the sum of the squares of the two legs: a² + b² = c².
One formula, two jobs. Know both legs and it gives the hypotenuse: the ladder’s length, the diagonal of a rectangular yard, the straight-line shortcut across a park. Know one leg and the hypotenuse and it gives the other leg — the way carpenters check a corner is square using the 3-4-5 triple, and the way you recover a width from a diagonal measurement. Because the hypotenuse must be the longest side, the calculator also flags the impossible cases: a “hypotenuse” shorter than a leg means something was measured or typed wrong, not that the triangle is broken.
Use the mode switch to pick what you are solving for, then type the two sides you know. The answer appears as you type, rounded to two decimals, with the full substitution worked through underneath — 3² + 4² = 9 + 16 = 25, so c = √25 = 5 — so you can follow each step against your own working. All arithmetic happens in your browser; no lengths, homework answers or site measurements are sent anywhere.
Frequently asked questions
What is the formula for the Pythagorean theorem?
a² + b² = c², where a and b are the legs of a right triangle and c is the hypotenuse opposite the right angle. Squaring each side means multiplying it by itself: 3² = 9, 4² = 16, and 9 + 16 = 25 = 5², so a 3-by-4 right triangle has a hypotenuse of 5.
How do I find the hypotenuse?
Square both legs, add them, and take the square root: c = √(a² + b²). With legs 6 and 8, that is √(36 + 64) = √100 = 10. Choose “Find the hypotenuse (c)” above and enter the two legs — it is the same computation this page performs as a hypotenuse calculator.
How do I find a missing leg?
Square the hypotenuse, subtract the square of the known leg, and take the square root: b = √(c² − a²). With a = 8 and c = 17, that is √(289 − 64) = √225 = 15. If your hypotenuse comes out shorter than the leg, one of the values is wrong — the hypotenuse is always the longest side of a right triangle.
What are Pythagorean triples?
They are sets of three whole numbers that satisfy a² + b² = c² exactly. The smallest is 3-4-5; the next common ones are 5-12-13 and 8-15-17, which this page’s examples use. Their multiples work too — doubling 3-4-5 gives 6-8-10 — and carpenters carry a folded 3-4-5 rule precisely because these triples let them lay out perfect right angles with a tape measure.
Can I use this calculator for any triangle?
Only for right triangles — the theorem holds when one angle is exactly 90°. As a right triangle calculator it solves any side from the other two, but for oblique triangles (all angles acute, or one obtuse) you need the law of cosines instead, because there is no single hypotenuse to anchor the formula.
How do you do the Pythagorean theorem on a calculator?
Square each known side with the x² key, add the squares (or subtract when finding a leg), then press the square-root key. For 3 and 4: 3² = 9, 4² = 16, 9 + 16 = 25, and √25 = 5. The tool above automates exactly those three key presses and shows the intermediate values so you can check them.
Related tools
- Slope Calculator
Find the slope, equation, percent grade, angle and distance between two points on a line.
- Volume Calculator
Calculate the volume of a cylinder, sphere, cone, cube or box from its dimensions.
- Average Calculator
Quickly find the average of a list of numbers.
- BMI Calculator
Calculate your BMI in metric or imperial units and see your WHO category and healthy weight range.
- CD Calculator
Calculate the maturity value and interest of a certificate of deposit from the deposit, APY, term and compounding.
- Compound Interest Calculator
Calculate compound growth of a lump sum plus monthly contributions.
Browse all calculators.