Pythagorean Theorem Calculator
Hypotenuse · Missing leg · Right triangle check · Distance formula
📐 Enter two sides of a right triangle, three sides to test, or two points to see the answer with every step.
What Is the Pythagorean Theorem?
The Pythagorean theorem states that in a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². The legs a and b form the 90° angle, and the hypotenuse c is the side opposite it, always the longest side.
The diagram in the results draws a square on each side of your triangle. The area of the square on the hypotenuse equals the combined area of the two smaller squares, which is exactly what the formula says. Knowing any two sides of a right triangle is enough to find the third, and the same idea gives the distance formula for points on a graph.
How to Use the Pythagorean Theorem Calculator
- Find a side: choose whether you need the hypotenuse c or a leg, then enter the two sides you know. The answer appears in decimal form and, when the squares are whole numbers, in simplest radical form such as 3√13. You also get both acute angles, the area, perimeter, and the altitude to the hypotenuse.
- Is it right?: enter three side lengths in any order. The calculator takes the longest as c, compares a² + b² with c², and reports a right, acute, or obtuse triangle, or tells you the sides cannot form a triangle.
- Distance: enter two points (x₁, y₁) and (x₂, y₂) to get the straight line distance, the horizontal and vertical changes, the midpoint, and the slope.
The unit menu labels the answer. Enter every side in the same unit; the area comes out in square units.
Pythagorean Theorem Formulas with Examples
Common Pythagorean Triples
| a | b | c | Check |
|---|---|---|---|
| 3 | 4 | 5 | 9 + 16 = 25 |
| 5 | 12 | 13 | 25 + 144 = 169 |
| 8 | 15 | 17 | 64 + 225 = 289 |
| 7 | 24 | 25 | 49 + 576 = 625 |
| 20 | 21 | 29 | 400 + 441 = 841 |
| 9 | 40 | 41 | 81 + 1,600 = 1,681 |
These are primitive triples with no common factor. Multiplying one by a whole number gives another triple, so 6, 8, 10 and 9, 12, 15 also work. Euclid's formula a = m² − n², b = 2mn, c = m² + n² builds triples: m = 3 and n = 2 give 5, 12, 13.
How to Check If a Triangle Is a Right Triangle
The converse of the theorem works in reverse: if a² + b² = c² for the longest side c, the triangle has a right angle. Comparing the two sides of the equation also tells you the other angle types.
| Result | Triangle | Example |
|---|---|---|
| a² + b² = c² | Right | 5, 12, 13: 169 = 169 |
| a² + b² > c² | Acute | 6, 7, 8: 85 > 64 |
| a² + b² < c² | Obtuse | 7, 8, 11: 113 < 121 |
Builders use this to square a corner: measure 3 ft along one wall and 4 ft along the other. If the diagonal between the marks is exactly 5 ft, the corner is 90°. Larger multiples such as 6, 8, 10 reduce measuring error.
Distance Formula and 3D Diagonals
The distance between two points is the hypotenuse of a right triangle whose legs are the horizontal and vertical changes.
Applying the theorem twice gives the diagonal of a box: d = √(l² + w² + h²). A box measuring 3 by 4 by 12 has a floor diagonal of 5 and a space diagonal of √(25 + 144) = 13.
Simplest Radical Form and Rounding
Most right triangles do not have whole number sides, so the answer is often a square root. To simplify √n, factor out the largest perfect square: √117 = √(9 × 13) = 3√13, and √72 = √(36 × 2) = 6√2. Teachers often ask for this exact form.
The calculator shows the exact form whenever the squared value is a whole number, alongside a decimal rounded to 4 places. Round only the final answer. Rounding a leg before squaring it can shift the result, especially for long sides measured in small units.
Why the Theorem Works
Arrange four copies of the right triangle inside a square with side a + b so that their hypotenuses form a tilted inner square of side c. The large square's area is (a + b)², which also equals the four triangles plus the inner square: 4 × ab ÷ 2 + c².
Setting the two expressions equal gives a² + 2ab + b² = 2ab + c², so a² + b² = c². Hundreds of other proofs exist, using similar triangles, shearing, and dissection.
Practical Examples and Common Mistakes
Ladder against a wall. A 13 ft ladder with its base 5 ft from the wall reaches √(169 − 25) = 12 ft up the wall.
TV screen size. Screens are sold by diagonal. A 55 inch screen with a 16:9 shape has a diagonal ratio of √(16² + 9²) = 18.358, so it is 55 × 16 ÷ 18.358 = 47.94 inches wide and 55 × 9 ÷ 18.358 = 26.96 inches tall.
Walking diagonally. Crossing a 40 m by 30 m field corner to corner is √(1,600 + 900) = 50 m instead of 70 m around the edge.
- Using a non right triangle. The formula only applies when one angle is exactly 90°. Use the law of cosines otherwise.
- Adding instead of subtracting for a leg. A missing leg is √(c² − b²), not √(c² + b²). The leg must come out shorter than c.
- Adding the sides before squaring. (3 + 4)² = 49 is not 3² + 4² = 25.
- Forgetting the square root. a² + b² gives c², not c. For legs 3 and 4 the answer is 5, not 25.
- Mixed units. Convert feet and inches to one unit before squaring.
Frequently Asked Questions
Sources & References
- OpenStax. Prealgebra 2e, 9.3 Use Properties of Angles, Triangles, and the Pythagorean Theorem. openstax.org
- OpenStax. College Algebra 2e, 2.1 The Rectangular Coordinate Systems and Graphs (distance formula, midpoint). openstax.org
- Weisstein EW. Pythagorean Theorem. Wolfram MathWorld. mathworld.wolfram.com
- Weisstein EW. Pythagorean Triple (primitive triples, generating formula). Wolfram MathWorld. mathworld.wolfram.com
Results are for educational purposes. Check critical measurements before cutting or building. Methodology reviewed: 2026.