The Pythagorean theorem says that in a right triangle a² + b² = c², where c is the hypotenuse, the side opposite the right angle. For legs of 3 and 4, c = √(9 + 16) = 5. To find a leg, use a = √(c² − b²).
The Pythagorean theorem (stelling van Pythagoras)
For any triangle with a right angle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². It is one of the oldest results in mathematics and it works in both directions: if three sides satisfy the equation, the triangle has a right angle. The calculator uses it to find the hypotenuse (c = √(a² + b²)) or a leg (a = √(c² − b²)).
Worked examples
| Known | Find | Calculation | Result |
|---|---|---|---|
| a = 3, b = 4 | c | √(9 + 16) | 5 |
| a = 5, b = 12 | c | √(25 + 144) | 13 |
| c = 10, b = 6 | a | √(100 − 36) | 8 |
| a = 1, b = 1 | c | √2 | 1.4142 |
Triples like 3-4-5, 5-12-13 and 8-15-17 give whole-number sides, which builders use to check right angles. Mark 3 m and 4 m from a corner, and the diagonal should be exactly 5 m.
Everyday uses
- Ladders: a ladder of 4 m placed 1.2 m from a wall reaches √(16 − 1.44) = 3.82 m high.
- Screens: the diagonal of a 16:9 monitor with a 60 cm width is about 68.8 cm. The FOV calculator uses similar geometry.
- Distance on a map: straight-line distance between two points from the horizontal and vertical differences.
- Home improvement: diagonal bracing, roof pitch and stairs. See the Laminate Flooring Calculator for floor areas.
Other results from the same triangle
With all three sides known, area = ½ × a × b, perimeter = a + b + c, and the acute angles come from the inverse tangent: the angle opposite a is arctan(a ÷ b). The height from the right angle to the hypotenuse is a × b ÷ c.
Beyond the right triangle: 3D distance and the diagonal of a box
The theorem extends to three dimensions. The space diagonal of a box with sides a, b and c is √(a² + b² + c²). A shipping box of 60 × 40 × 30 cm has a diagonal of √(3600 + 1600 + 900) = 78.1 cm, which tells you the longest object that fits inside. In the same way, the distance between two points (x₁, y₁) and (x₂, y₂) on a map is √((x₂ − x₁)² + (y₂ − y₁)²), and this is the basis of nearest-neighbour searches and many game physics routines.
When the triangle does not have a right angle, the law of cosines generalises the theorem: c² = a² + b² − 2ab·cos(C). With C = 90° the cosine term vanishes and you are back at Pythagoras.
How to use this calculator
- Choose which side you want to find.
- Enter the two sides you know. Leave the unknown field as is, it is ignored.
- Read the missing side, plus area, perimeter, both acute angles and the height to the hypotenuse.
- Check that the hypotenuse is always the longest side.
Key figures at a glance
| Theorem | a² + b² = c² |
|---|---|
| Hypotenuse | Longest side, opposite the 90° angle |
| Common triples | 3-4-5, 5-12-13, 8-15-17 |
| Area | ½ × a × b |
Frequently asked questions
Square both legs, add them and take the square root.
Subtract the square of the known leg from the square of the hypotenuse and take the square root.
No. For other triangles use the law of cosines.
Three whole numbers that satisfy a² + b² = c², like 3, 4, 5.
In a right triangle the hypotenuse is always longer than either leg.