Pythagorean Theorem Calculator
Use this browser-only tool to calculate a mathematical result from the displayed inputs.
Enter values
Result—
Enter valid values.
Formula and method
For a right-angled triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c², so c = √(a² + b²).
a and b are the two perpendicular sides (the legs). c is the hypotenuse, the side opposite the 90° angle and the longest side.
Worked examples
Example 1 — the 3–4–5 triangle
Let a = 3 cm and b = 4 cm. Then c = √(3² + 4²) = √(9 + 16) = √25 = 5 cm. Check: 3² + 4² = 5², or 9 + 16 = 25.
Example 2 — a 5–12–13 triangle
Let a = 5 m and b = 12 m. Then c = √(5² + 12²) = √(25 + 144) = √169 = 13 m.
How to use this calculator
- Confirm that the angle between the measured sides is 90°.
- Measure both legs from the same triangle and convert them to the same length unit.
- Enter the two positive lengths in Leg a and Leg b.
- Read the hypotenuse result in the same unit as the inputs. Default values 3 and 4 reproduce the first example.
- For schoolwork, show both squares, their sum and the square root.
Assumptions and limitations
- The theorem applies to a Euclidean right triangle, not an arbitrary non-right triangle.
- This calculator uses the two legs and returns the hypotenuse; it does not solve a missing leg from a hypotenuse-and-leg pair.
- Both inputs must be positive lengths in consistent units. Measurement error is not estimated.
- For construction or structural work, verify geometry against project drawings and applicable professional requirements. This educational tool is not a structural or building-code approval.
Related learning and reference
OpenStax explains the right-triangle relationship in Contemporary Mathematics, Section 10.8: Right Triangle Trigonometry.