Pythagorean Theorem Calculator

Calculate any missing side of a right triangle using a² + b² = c². Enter any two sides to find the third - fast and accurate.

Calculate Right Triangle

Pythagorean Theorem

a² + b² = c²

Enter any two values to find the third:

Results

Choose what to find and enter values

Understanding the Pythagorean Theorem

The Pythagorean theorem states that in any right triangle, the square of the hypotenuse (the longest side, opposite the right angle) equals the sum of the squares of the other two sides: a² + b² = c². It is named after the Greek mathematician Pythagoras, who lived around 500 BC.

Given any two sides of a right triangle, the theorem gives you the third. No angles are needed beyond knowing that one of them is 90°. That is why it shows up in construction, navigation and computer graphics: anywhere you need a distance and have a right angle to work from. It holds for every right triangle, at any size.

How to Use a² + b² = c²

Square the two sides you know, add or subtract, then take the square root. Which one depends on the side you are missing.

  • Missing the hypotenuse: c = √(a² + b²)
  • Missing a leg: a = √(c² − b²), or b = √(c² − a²)

Example 1, find the hypotenuse. The legs are 6 and 8. c = √(6² + 8²) = √(36 + 64) = √100 = 10.

Example 2, find a leg. The hypotenuse is 13 and one leg is 5. b = √(13² − 5²) = √(169 − 25) = √144 = 12.

Example 3, an answer that is not a whole number. The legs are 4 and 7. c = √(16 + 49) = √65 ≈ 8.06. Most right triangles come out like this one. Keep √65 if you need the exact value.

Finding the Angles

The theorem works with side lengths only. Once you have all three sides, the angles come from inverse trig: A = arctan(a ÷ b), and B = 90° − A. For the 6-8-10 triangle, A = arctan(6 ÷ 8) = 36.87° and B = 53.13°. The right triangle calculator returns the sides and the angles together, and the inverse trig calculator turns any ratio into an angle.

Historical Significance

The relationship is older than Pythagoras. Babylonian clay tablets from around 1800 BC list Pythagorean triples (whole-number solutions such as 3-4-5), and early Indian geometry texts state the rule as well. Greek tradition credits Pythagoras or his followers with the first proof. Hundreds of different proofs are known today, including one by U.S. President James Garfield. Many of them are collected in Cut-the-Knot's collection of 122+ proofs of the Pythagorean theorem.

Common Applications

Construction and carpentry: Builders use the 3-4-5 rule to square a corner. Measure 3 feet along one wall and 4 feet along the other. If the diagonal between those two marks is exactly 5 feet, the corner is 90°. The diagonal calculator scales the same check up to a full deck or slab.

Navigation and distance: GPS systems, pilots, and sailors use the Pythagorean theorem to calculate straight-line distances when they have north-south and east-west components. The distance formula in coordinate geometry is the same theorem written with x and y.

Computer graphics and gaming: Calculating distances between points in 2D and 3D space (extended to √(x² + y² + z²)) is used for rendering, collision detection, and physics simulations.

Architecture and engineering: A diagonal brace, a ramp, a roof rafter and a stair stringer are each the hypotenuse of a right triangle, so each length comes from a² + b² = c².

Pythagorean Triples

Pythagorean triples are sets of three positive integers that satisfy the equation a² + b² = c². The most famous is 3-4-5, but there are infinitely many. Common triples include 5-12-13, 8-15-17, and 7-24-25. Any multiple of a Pythagorean triple is also a triple, so 6-8-10 (double of 3-4-5) and 9-12-15 (triple of 3-4-5) also work. For a picture of why the theorem works, see Math is Fun's visual proof of the Pythagorean theorem. Builders like triples because every side comes out as a whole number, which is easy to measure with a tape. There is a longer list in the guide to Pythagorean triples.

The Formula:

a² + b² = c²

Where a and b are the legs (sides forming the right angle) and c is the hypotenuse (longest side)

Common Mistakes

  • Confusing which side is the hypotenuse: The hypotenuse c is the longest side, opposite the right angle. It is never one of the two sides that form the right angle.
  • Forgetting to take the square root: a² + b² gives c², not c. Take the square root as the last step.
  • Using it for non-right triangles: The theorem only works when one angle is 90°. For any other triangle, use the Law of Cosines. A 30-60-90 or 45-45-90 triangle has a shortcut: see special right triangles.
  • Unit inconsistency: All sides must use the same units. Don't mix feet and meters, or inches and centimeters.

Frequently Asked Questions

What does a² + b² = c² mean?

In a right triangle, a and b are the two legs that form the 90° angle and c is the hypotenuse, the side across from it. The equation says the square of the hypotenuse equals the squares of the two legs added together. With legs of 3 and 4: 3² + 4² = 9 + 16 = 25, and √25 = 5, so the hypotenuse is 5.

What is the Pythagorean theorem used for?

The Pythagorean theorem calculates the length of any side of a right triangle when you know the other two sides. It's used in construction, navigation, computer graphics, physics, and anywhere distances or right angles are involved.

Does it only work for right triangles?

Yes, the Pythagorean theorem only applies to right triangles (triangles with one 90° angle). For other triangle types, you need different formulas like the Law of Cosines.

What are Pythagorean triples?

Pythagorean triples are sets of three whole numbers that satisfy a² + b² = c². The most common is 3-4-5. Others include 5-12-13, 8-15-17, and 7-24-25. Any multiple of a triple also works (like 6-8-10).

Which side is the hypotenuse?

The hypotenuse (c) is always the longest side of a right triangle, opposite the right angle. The other two sides (a and b) are called legs and form the right angle.

Can I use this calculator for 3D distances?

This calculator works for 2D right triangles. For 3D distances, use the extended formula: distance = √(x² + y² + z²), which applies the Pythagorean theorem in three dimensions.

Learn More About Trigonometry

View all articles

Deepen your understanding of triangles and trigonometry with our guides and tutorials:

Formulas and results last reviewed . How we check accuracy · Corrections log · Report an error

Related Calculators

All calculators