How to use the Pythagorean Theorem Calculator
- Choose the side you want to find: the hypotenuse c, or one of the shorter sides a or b.
- Enter the two sides you know.
- Read the missing side, plus the area, perimeter and angles.
- If you get an error, check that the hypotenuse is the longest side.
Formula used
c = √(a² + b²), a = √(c² − b²), b = √(c² − a²). Area = ½ × a × b. Angle A = arctan(a ÷ b), angle B = 90° − A.
Worked example
Here is the Pythagorean Theorem Calculator worked through with the example values shown above, so you can check each step by hand.
| Inputs | |
|---|---|
| Find | Hypotenuse c (from a and b) |
| Side a | 3 |
| Side b | 4 |
| Hypotenuse c | 5 |
| Result | |
| Missing side | 5 |
| Area | 6 |
| Perimeter | 12 |
| Angle A (opposite side a), degrees | 36.869898 |
| Angle B (opposite side b), degrees | 53.130102 |
The formula
To find the hypotenuse, c = √(a² + b²). With a = 3 and b = 4 you get √(9 + 16) = √25 = 5. To find a shorter side, subtract: a = √(c² − b²). With c = 17 and b = 8, a = √(289 − 64) = √225 = 15.
The theorem only applies to right triangles, those with one angle of exactly 90 degrees. The hypotenuse is the side opposite that angle, and it is always the longest.
Pythagorean triples
Some whole-number combinations fit exactly: 3-4-5, 5-12-13 (the second gives c = 13), 8-15-17 and 7-24-25. Multiples of these also work, such as 6-8-10. Builders use the 3-4-5 rule to check that a corner is square by measuring 3 along one wall, 4 along the other and confirming the diagonal is 5.
Most side lengths are not whole numbers. A square with sides of 1 has a diagonal of √2, about 1.41421.
Angles and area
Once you have the sides, angle A is arctan(a ÷ b). For 3 and 4 that is 36.87° and the other angle is 53.13°, since the angles of a triangle add up to 180° and one is 90°. The area is half the product of the two shorter sides, here 6, and the perimeter is 12.
The two shorter sides are the legs, and either can be the base with the other as the height.
Practical uses
The theorem gives the diagonal of a rectangle or screen, the length of a ladder needed to reach a height, the straight-line distance between two points on a grid, and the slope length of a roof or ramp.
For a screen, the diagonal is the hypotenuse of its width and height. A 16 by 9 inch display has a diagonal of √(256 + 81) ≈ 18.36 inches.
Frequently asked questions
What is the Pythagorean theorem?
For a right triangle with legs a and b and hypotenuse c, a² + b² = c².
Does it work for any triangle?
No, only for right triangles. For other triangles use the law of cosines or the triangle area calculator.
Why does the calculator say the hypotenuse must be longer?
The hypotenuse is always the longest side. If you enter a hypotenuse shorter than the other side, no right triangle exists.
What is a 3-4-5 triangle?
The smallest whole-number right triangle: 3² + 4² = 9 + 16 = 25 = 5².
Can I use feet, metres or inches?
Yes, any unit, if the two known sides use the same one. The area is in square units of it.
How do I find the diagonal of a rectangle?
Use the width and length as a and b. The diagonal is the hypotenuse c.
This calculator gives estimates for information only. Actual figures from a bank, employer, tax authority or doctor may differ. It is not financial, tax, legal or medical advice.