Definition
What the Pythagorean theorem says
The Pythagorean theorem relates the sides of a right triangle. The sum of the squares of the two sides that meet at the right angle equals the square of the hypotenuse, the side opposite that angle. Any consistent unit of length works.
- Applies to
- Triangles with a 90° angle
- Longest side
- The hypotenuse faces the right angle
- Missing leg
- Subtract the squares before taking the root
What the theorem says
Draw a square on each side of a right triangle. The areas of the two smaller squares add up to the area of the largest one. That relationship, a² + b² = c², was known in many ancient cultures and is named after the Greek mathematician Pythagoras.
It is one of the most used results in geometry, showing up in building, navigation, screen sizes and distance calculations.
A worked example
A 13-foot ladder leans against a wall with its foot 5 feet from the base. How high does it reach? The ladder is the hypotenuse, so 13² − 5² = 169 − 25 = 144, and the square root is 12. It reaches 12 feet up the wall.
The same triangle has an area of 30 square feet, a perimeter of 30 feet, and acute angles of about 22.6° and 67.4°. Switch the calculator to Side a or Side b to try it.
Common uses
Carpenters check corners are square with the 3-4-5 rule: if the sides measure 3 and 4 units and the diagonal is exactly 5, the corner is a right angle. You can also use it to find the diagonal of a screen, a room or a garden plot.
In coordinates, the distance between two points uses the same idea: the horizontal and vertical differences are the two legs.
Good to know
Whole-number triples such as 3-4-5, 5-12-13 and 8-15-17 are called Pythagorean triples. Most real triangles give irrational results, so the answer is rounded to six decimal places here.
Practical uses
The theorem is the builder’s check for square corners: measure 3 along one wall and 4 along the other, and the diagonal between those marks should be exactly 5 (or 0.6, 0.8 and 1.0 m, or any multiple). It is also used for ladder safety, roof pitches, screen sizes and the straight-line distance between two points on a map grid.
It works only for right-angled triangles. If the longest side you enter is not longer than the other, the calculator flags it, because a hypotenuse is always the longest side.
Step-by-step example
A 13 ft ladder leans against a vertical wall with its foot 5 ft from the wall on level ground.
| Step | Result |
|---|---|
| Height up the wall | 12 ft |
| Area | 30 sq ft |
| Perimeter | 30 ft |
| Angle at the top of the ladder | 22.6° |
| Angle with the ground | 67.4° |
Formulas used
a² + b² = c²
c = √(a² + b²) a = √(c² − b²) b = √(c² − a²)
- a
- first leg
- b
- second leg
- c
- hypotenuse
Example: Legs 3 and 4: c = √(9 + 16) = 5. With c = 13 and a = 5, b = √(169 − 25) = 12.
Area = a × b ÷ 2
Perimeter = a + b + c
Angle A = arctan(a ÷ b)
- a
- first leg
- b
- second leg
- c
- hypotenuse
- A
- angle opposite leg a
- arctan
- inverse tangent
Example: For 3-4-5: area 6, perimeter 12, angles 36.87° and 53.13° (they add to 90°).
When the answer can mislead
- Convert every side to the same unit before squaring.
- A ladder on sloping ground may form a triangle whose wall and ground are not perpendicular.
- To check a corner with measured lengths, allow for measurement error before ruling out a right angle.
Questions
What is the Pythagorean theorem?
In a right triangle, the square of the longest side (the hypotenuse, c) equals the sum of the squares of the other two sides: a² + b² = c². It lets you find any one side when you know the other two.
How do I find the hypotenuse?
Square both shorter sides, add them, and take the square root. With sides 3 and 4, 9 + 16 = 25, and the square root of 25 is 5.
How do I find a missing leg?
Subtract the square of the known leg from the square of the hypotenuse, then take the square root. With a hypotenuse of 13 and a leg of 12, 169 − 144 = 25, so the other leg is 5.
Does it only work for right triangles?
Yes. The theorem applies when one angle is exactly 90°. For other triangles you need the law of cosines, which includes an extra term for the angle.
What units should I use?
Any unit, as long as all sides use the same one. The answer is in that unit, the area in its square. Convert feet to inches, or metres to centimetres, before entering numbers if they are mixed.
Embed this calculator
Cite this calculator
Pythagorean Theorem Calculator. CalculatorLab. https://calculatorlab.site/calculators/pythagorean-theorem-calculator/. Last updated . Accessed .