What does this calculator do?
The Pythagorean theorem links the three sides of a right triangle: the squares of the two legs add up to the square of the hypotenuse. Pick which side you are missing, enter the other two, and the calculator solves for it — showing the substitution and a verification line so you can confirm the identity holds. Use any length unit — as long as both known sides use the same one, the missing side comes out in that unit.
Formula
Solving the same identity for each side:
c = √(a² + b²) a = √(c² − b²) b = √(c² − a²)
How to use it
Choose the side to solve for; the form shows the two inputs it needs. When solving for a leg, the hypotenuse must be the longest value you enter — otherwise the square root would be of a negative number and the calculator rejects the input.
Worked example
Legs 3 and 4: c = √(9 + 16) = √25 = 5. Check: 3² + 4² = 9 + 16 = 25 = 5².
Frequently asked questions
Does this work for any triangle?
No — only right triangles. For a triangle without a 90° angle, use the Law of Cosines calculator, which generalises the same identity with a −2ab·cos(C) term.
Why is the check line shown?
Substituting the answer back into a² + b² = c² is the quickest way to confirm nothing went wrong — the two sides of the identity must match to display precision.
What are Pythagorean triples?
Whole-number solutions like 3-4-5 or 5-12-13. Any multiple of a triple (6-8-10, …) is also a right triangle, which makes them handy for checking squareness in construction.
Sources
- Standard Euclidean triangle geometry (Heron’s formula, the Pythagorean theorem, the law of cosines). Results are mathematically calculated from the supplied values, subject to input and display precision; the exact formula is shown on this page.
- OpenStax — Algebra and Trigonometry 2e (non-right triangles: law of cosines and Heron’s formula chapter)
- Khan Academy — Right triangles and trigonometry (kept as an accessible explainer, not the primary source)
- Reviewed: 2026-07-31
Related calculators
Last updated: 2026-07-31 · v1.0.0 · Report an error