Geometry
Pythagorean Theorem Calculator
Enter your details
Runs in your browser
How to use it
Using the pythagorean theorem calculator
- 01
Choose what you know
Two legs → solve for the hypotenuse; hypotenuse plus one leg → solve for the missing leg.
- 02
Enter the known lengths
Same unit throughout; feet with feet, meters with meters.
- 03
Read the missing side
The check row shows the verified equation for confidence.
Good to know
The 3-4-5 trick on the job site
Carpenters confirm square corners without levels: mark 3 units along one edge, 4 along the other, and adjust until the diagonal measures exactly 5. Any multiple works (6-8-10), scaling up to foundation layouts where being off by degrees means wasted lumber.
It generalizes further than triangles
Distance formulas in coordinate geometry, screen diagonal sizing, GPS error budgets and vector magnitudes all rest on this identity. Whenever motion or extent happens along perpendicular axes, the theorem recombines them.
How it's calculated
The math behind this calculator
c = √(a² + b²) b = √(c² − a²)In any right triangle, the square of the hypotenuse equals the sum of squares of the legs. Finding the hypotenuse adds the squares; recovering a missing leg subtracts them before taking the root.
Leg-solving validates geometry as well as arithmetic: the known hypotenuse must exceed the known leg, otherwise no such right triangle exists and the input is rejected with an explanation.
Assumptions & limitations
- The triangle contains a genuine 90° angle.
- All lengths positive and in consistent units.
- A hypotenuse must be the strictly longest side.
Worked example
Legs of 3 and 4 give a hypotenuse of exactly 5; the most famous Pythagorean triple, used by builders for centuries to square corners.
FAQ
Frequently asked questions
- Does this work for non-right triangles?
- No; the theorem requires a 90° angle. For oblique triangles, use the law of cosines instead.
- Why was my leg rejected?
- The entered hypotenuse must be longer than the known leg; equal or shorter values cannot form a right triangle.
- Are decimals supported?
- Fully; the theorem holds for all real lengths, not just whole-number triples.
- What are Pythagorean triples?
- Whole-number solutions like 3-4-5, 5-12-13 and 8-15-17; handy exact checks when estimating.
Keep exploring