Pythagorean Theorem Calculator: Find a, b, or Hypotenuse

Free Pythagorean theorem calculator. Enter any two sides to find the third with a² + b² = c². Solve the hypotenuse or a leg, plus area and perimeter.

Pythagorean Theorem Calculator

Solve a right triangle with a² + b² = c², where a and b are the legs and c is the hypotenuse. Enter any two sides and the third is found for you.

Quick example:
a b c a² + b² = c²

The Pythagorean theorem says a² + b² = c², where a and b are the two legs of a right triangle and c is the hypotenuse, the longest side. Square the two legs, add them, and the total equals the hypotenuse squared. A right triangle with legs of 3 and 4 has a hypotenuse of 5, because 9 + 16 = 25. Enter any two sides above and the calculator finds the third.

It also gives the area and perimeter of the triangle when you tick the box. Work in any unit, from millimeters to yards, and the tool converts as you go. This one rule connects the three sides of every right triangle, and it is one of the most used formulas in all of math.

Pythagorean Theorem Calculator

What is the Pythagorean theorem?

The Pythagorean theorem is a rule about right triangles, triangles with one 90 degree angle. It states that the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². The hypotenuse is always the side opposite the right angle, and it is always the longest of the three.

In plain words, if you build a square on each side of a right triangle, the big square on the hypotenuse has exactly the same area as the two smaller squares combined. This holds for every right triangle, no exceptions. a b c a² + b² = c²

How do you use the Pythagorean theorem?

Pick which side you are missing. To find the hypotenuse from the two legs, square both legs, add them, and take the square root: c = √(a² + b²). To find a missing leg from the hypotenuse and the other leg, subtract instead: a = √(c² − b²).

For legs of 6 and 8, the hypotenuse is √(36 + 64) = √100 = 10. For a hypotenuse of 13 and a leg of 5, the other leg is √(169 − 25) = √144 = 12. The calculator does the squaring and the square root for you, whichever side is missing.

How do you find the hypotenuse?

The hypotenuse is the longest side, opposite the right angle. Square both legs, add them together, then take the square root of the total. That is c = √(a² + b²). A right triangle with legs 5 and 12 has a hypotenuse of √(25 + 144) = √169 = 13. Enter the two legs in the calculator and the hypotenuse appears at once.

How do you find a leg when you know the hypotenuse?

Rearrange the theorem to subtract. If you know the hypotenuse c and one leg, the other leg is the square root of the hypotenuse squared minus the known leg squared: a = √(c² − b²). A triangle with a hypotenuse of 10 and one leg of 6 has a second leg of √(100 − 36) = √64 = 8. The one rule to remember: the hypotenuse must always be longer than either leg, or no real triangle fits.

Worked example: the diagonal of a TV screen

Screen sizes are the most common real use people never notice. A TV listed as a certain number of inches means the diagonal, which is the hypotenuse of the rectangle. Say a screen is 48 inches wide and 27 inches tall. The diagonal is √(48² + 27²) = √(2,304 + 729) = √3,033, about 55 inches. That is why it would sell as a 55-inch TV. Flip it around and you can check whether a TV fits a space: enter the width and height of your gap and the theorem gives the largest diagonal that fits. This is the same diagonal you get from the rectangle calculator.

Common Pythagorean triples

A Pythagorean triple is a set of three whole numbers that fit the theorem exactly. They show up constantly in problems and construction. Here are the most common ones and their multiples.

Leg aLeg bHypotenuse cCheck (a² + b²)
3459 + 16 = 25
5121325 + 144 = 169
681036 + 64 = 100
8151764 + 225 = 289
7242549 + 576 = 625
9404181 + 1600 = 1681
202129400 + 441 = 841

What is the converse of the Pythagorean theorem?

The theorem also works in reverse to test for a right angle. If three sides satisfy a² + b² = c², the triangle must have a right angle opposite the longest side. This is the converse, and builders use it constantly. Measure three lengths of a corner: if they form a 3-4-5 pattern, or any multiple like 6-8-10, the corner is a true 90 degrees. If a² + b² is larger than c², the angle is acute. If it is smaller, the angle is obtuse. So the same rule both finds sides and checks angles.

How does the Pythagorean theorem relate to distance?

The distance formula in coordinate geometry is the Pythagorean theorem in disguise. The straight-line distance between two points is the square root of the horizontal gap squared plus the vertical gap squared. Those two gaps are the legs of a right triangle, and the distance is the hypotenuse. So every time you measure a straight-line distance on a grid or map, you are using a² + b² = c² without writing it out. It underpins the coordinate math behind tools like the slope-intercept form calculator.

What units does the Pythagorean theorem use?

Whatever length unit you put in, you get back. Legs in centimeters give a hypotenuse in centimeters. The sides are all lengths, so they share one unit. The area, if you show it, comes out in square units, since it multiplies two lengths. Keep all three sides in the same unit, or let the calculator convert between millimeters, centimeters, meters, inches, feet, and yards.

Real example: the safe reach of a ladder

Ladder safety runs on this theorem. A ladder leaning against a wall forms a right triangle: the ground distance is one leg, the wall height is the other, and the ladder itself is the hypotenuse. Say a 5 meter ladder is placed with its base 1.5 meters from the wall. The height it reaches is √(5² − 1.5²) = √(25 − 2.25) = √22.75, about 4.77 meters. Move the base closer and it reaches higher but grows less stable. This side-and-diagonal math is exactly what the calculator solves.

Where is the Pythagorean theorem used in real life?

Everywhere a right angle meets a distance. Builders use the 3-4-5 rule to square up corners of foundations and decks. It finds the diagonal of a TV or monitor from its width and height. Navigators and surveyors use it for straight-line distances. It gives the length of a ramp, a ladder against a wall, a roof rafter, or the shortest path across a rectangular field. The legs also form a right triangle you can measure with the triangle area calculator. Any time you need the diagonal or the straight distance between two points, this is the theorem behind it.

Frequently asked questions

What is the Pythagorean theorem?

It is the rule a² + b² = c² for right triangles, linking the two legs to the hypotenuse. The square of the longest side equals the sum of the squares of the other two.

How do you find the hypotenuse?

Square both legs, add them, and take the square root: c = √(a² + b²). For legs 3 and 4, the hypotenuse is 5.

Does the Pythagorean theorem work for all triangles?

No. It works only for right triangles, those with a 90 degree angle. For other triangles you need the law of cosines instead.

What is the longest side of a right triangle called?

The hypotenuse. It is always opposite the right angle and always the longest of the three sides.

What is a Pythagorean triple?

Three whole numbers that satisfy a² + b² = c², such as 3, 4, 5 or 5, 12, 13. Their multiples, like 6, 8, 10, work too.

Can the hypotenuse be shorter than a leg?

No. The hypotenuse is always the longest side. If you enter a hypotenuse smaller than a leg, no real right triangle exists, and the calculator flags it.

Who discovered the Pythagorean theorem?

It is named after the Greek mathematician Pythagoras, around 500 BCE, though the relationship was known to Babylonian and Indian mathematicians centuries earlier. The name stuck to Pythagoras because his school is credited with an early proof.

What is the area of a right triangle?

Half the product of the two legs, since they meet at the right angle and act as base and height. A right triangle with legs 3 and 4 has an area of ½ × 3 × 4 = 6. Tick the area box in the calculator to see it.

Can the Pythagorean theorem give a decimal answer?

Yes, and usually it does. Only special triples give whole numbers. Legs of 2 and 3 give a hypotenuse of √13, about 3.606. The calculator returns the exact decimal.

What is the 3-4-5 rule?

It is the simplest Pythagorean triple, used to make right angles on the job. Measure 3 units along one line, 4 along the other, and if the diagonal between the ends is exactly 5, the corner is square.

Try these next