In a right triangle the square on the hypotenuse equals the sum of the squares on the legs. This 2,500-year-old theorem lets you find distances you cannot measure directly: the diagonal of a screen, the length of a ladder, the straight-line distance on a map.
How to use the Pythagorean Theorem Calculator
- Find
- Leg a
- Leg b
- Hypotenuse c
Results update as you type, and everything is calculated in your browser.
How it works
Choose which side you want, enter the other two and the calculator applies the theorem. The hypotenuse must be longer than either leg.
Inputs explained
| Field | What to enter |
|---|---|
| Find | Choose one: Hypotenuse c, Leg a, Leg b |
| Leg a | Units: cm, m, mm, in, ft, yd … |
| Leg b | Units: cm, m, mm, in, ft, yd … |
| Hypotenuse c | Units: cm, m, mm, in, ft, yd … |
What each result means
- Angle α (opposite a) = deg(atan([Leg a]÷[Leg b]))
- Angle β (opposite b) = 90 – [Angle α (opposite a)]
- Area = [Leg a]×[Leg b]÷2
- Perimeter = [Leg a] + [Leg b] + [Hypotenuse c]
Example values
How the main result changes when Leg a changes and everything else stays at the example values above:
| Leg a (cm) | Leg a (cm) |
|---|---|
| 1.5 | 1.5 |
| 2.25 | 2.25 |
| 3 | 3 |
| 3.75 | 3.75 |
| 4.5 | 4.5 |
| 6 | 6 |
Formula
a² + b² = c²
c = √(a² + b²), a = √(c² − b²), b = √(c² − a²)
Worked example
Inputs: Find: Hypotenuse c; Leg a: 3 cm; Leg b: 4 cm.
Results: Hypotenuse c = 5 cm; Angle α (opposite a) = 36.869898 °; Angle β (opposite b) = 53.130102 °; Area = 6 cm²; Perimeter = 12 cm.
Key terms
- Hypotenuse
- The side opposite the right angle.
- Leg
- Either side forming the right angle.
Frequently asked questions
Does the Pythagorean theorem work for every triangle?
Only right triangles; for others use the law of cosines.
What is the hypotenuse?
The longest side, opposite the right angle.
How do I check if a corner is square?
Measure 3, 4 and 5 units, the 3-4-5 rule.
Who discovered it?
It is named after Pythagoras, though Babylonians used it a thousand years earlier.