100+ free calculators - no signup, no ads | 💰 Financial ❤️ Health & Fitness 📐 Math 🔧 Other
🇺🇸 USD | About Contact

Pythagorean Theorem Calculator

Hypotenuse · Missing leg · Right triangle check · Distance formula

c = √(a² + b²)

📐 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

  1. 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.
  2. 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.
  3. 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

Hypotenuse: c = √(a² + b²) a = 3, b = 4: c = √(9 + 16) = √25 = 5 a = 6, b = 9: c = √(36 + 81) = √117 = 3√13 ≈ 10.8167
Missing leg: a = √(c² − b²) c = 13, b = 5: a = √(169 − 25) = √144 = 12 c = 10, b = 7: a = √(100 − 49) = √51 ≈ 7.1414
Angles: A = arctan(a ÷ b), B = 90° − A 3, 4, 5 triangle: A = arctan(0.75) = 36.87°, B = 53.13°

Common Pythagorean Triples

abcCheck
3459 + 16 = 25
5121325 + 144 = 169
8151764 + 225 = 289
7242549 + 576 = 625
202129400 + 441 = 841
9404181 + 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.

ResultTriangleExample
a² + b² = c²Right5, 12, 13: 169 = 169
a² + b² > c²Acute6, 7, 8: 85 > 64
a² + b² < c²Obtuse7, 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.

d = √((x₂ − x₁)² + (y₂ − y₁)²) (1, 2) to (7, 10): Δx = 6, Δy = 8 d = √(36 + 64) = √100 = 10

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

How do you find the hypotenuse of a right triangle?
Square both legs, add them, and take the square root: c = √(a² + b²). Legs of 3 and 4 give √25 = 5. Legs of 6 and 9 give √117 = 3√13 ≈ 10.817. The hypotenuse is opposite the right angle and is always the longest side, so any answer shorter than a leg signals an error.
How do you find a missing leg with the Pythagorean theorem?
Rearrange to a = √(c² − b²). With c = 13 and b = 5, a = √(169 − 25) = √144 = 12. The hypotenuse must be longer than the known leg; if it is not, the calculator shows an error because no right triangle has those measurements.
What is a Pythagorean triple?
Three positive whole numbers with a² + b² = c², such as 3, 4, 5 or 5, 12, 13. Whole number multiples are also triples, so 6, 8, 10 works. The calculator labels your answer as a triple when all three sides are whole numbers.
How do you know if a triangle is a right triangle?
Square the two shorter sides and compare their sum with the square of the longest side. Equal means right, larger means acute, and smaller means obtuse. Measured lengths rarely match exactly, so the calculator also shows the largest angle; a value very close to 90° indicates a nearly right triangle.
Does the Pythagorean theorem work for all triangles?
No, only right triangles. For any triangle, the law of cosines c² = a² + b² − 2ab cos C applies, and it reduces to the Pythagorean theorem when C = 90°. The triangle calculator solves general triangles.

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.