Pythagorean Theorem Calculator

Find the missing side of a right triangle, with its angles and area.

Last updated 2026-11-26 · How we calculate this

Enter the Sides You Know

Calculation

You know both legs, the two sides that meet at the right angle.

One of the two sides that meet at the right angle. Any unit, as long as every side uses the same one.
The other side that meets at the right angle.
The side opposite the right angle. It must be longer than the leg you know.
One of the two sides that meet at the right angle, in the same unit as the hypotenuse.

Missing Side

Enter two sides to find the third.

The theorem only applies to triangles with a 90° angle; for other triangles the law of cosines is needed. Answers are rounded to four decimal places, so a side such as √2 shows as 1.4142. Angles are in degrees.

Quick Answer

In a right triangle, a² + b² = c², where c is the hypotenuse, the longest side, opposite the right angle. To find c, square the two legs, add them and take the square root: legs of 3 and 4 give 9 + 16 = 25, so c = 5. To find a leg, subtract instead: √(13² − 5²) = √144 = 12.

How to Use This Calculator

Choose whether you know the two shorter sides (the legs) and want the hypotenuse, or know the hypotenuse and one leg and want the other leg. Use any unit, such as inches, feet or meters, as long as every side is in the same one, and the answer comes out in that unit. Alongside the missing side you get the working, the two angles that are not the right angle, and the triangle's area and perimeter.

  1. Choose Find the hypotenuse or Find a leg.
  2. Enter the two sides you know, all in the same unit.
  3. Read the missing side and the working.
  4. Check the angles, area and perimeter if you need them.

The Formula

a² + b² = c² · c = √(a² + b²) · a = √(c² − b²)

Picture a square drawn on each side of the triangle. The theorem says the square on the hypotenuse has exactly the same area as the other two squares put together. That is why finding the hypotenuse means adding the squares of the legs, and finding a leg means subtracting the square of the known leg from the square of the hypotenuse. The two angles that are not the right angle always add up to 90°, and the area is half of one leg times the other.

Worked Example

Legs of 3 and 4: 3² + 4² = 9 + 16 = 25, so the hypotenuse is √25 = 5. The angles are 36.8699° and 53.1301°, the area is 6 and the perimeter is 12.

Hypotenuse 13 and a leg of 5: 13² − 5² = 169 − 25 = 144, so the missing leg is √144 = 12.

A 12-foot ladder with its foot 3 feet from the wall: 12² − 3² = 135, so it reaches √135 = 11.619 feet up the wall.

A 55-inch TV is measured across the diagonal. For a 16 : 9 screen the diagonal of a 16 by 9 shape is about 18.3576, so the screen is about 55 × 16 ÷ 18.3576 = 47.9367 inches wide and 26.9644 inches tall.

Frequently Asked Questions

Which side is the hypotenuse?

It is the side opposite the right angle, the one that does not touch the small square corner mark, and it is always the longest of the three. The two sides that do meet at the right angle are the legs. Mixing them up is the most common mistake, because a leg can never be longer than the hypotenuse.

Does it work for triangles without a right angle?

No. a² + b² = c² holds only when one angle is exactly 90°. For other triangles the law of cosines, c² = a² + b² − 2ab × cos C, adds a correction for the angle. The theorem also works backwards: if a triangle's sides fit a² + b² = c², it has a right angle.

What are Pythagorean triples?

Sets of three whole numbers that fit the theorem exactly, so the hypotenuse comes out without a square root. The best known are 3, 4, 5 and 5, 12, 13, followed by 8, 15, 17 and 7, 24, 25. Any multiple works too, so 6, 8, 10 and 9, 12, 15 are triples as well.

How do builders check that a corner is square?

With the 3-4-5 rule. Measure 3 feet along one wall and 4 feet along the other, then measure between the two marks. If the gap is exactly 5 feet, the corner is 90°. For bigger layouts, scale it up to 6, 8 and 10 or 9, 12 and 15 for better accuracy.

How do I find a screen's width from its diagonal?

Screen sizes are diagonals, the hypotenuse of a right triangle whose legs are the width and the height. Work out the diagonal of the shape first, such as √(16² + 9²) ≈ 18.3576 for 16 : 9, then multiply the screen size by 16 and by 9 and divide each by that figure. The Ratio Calculator can confirm a screen's shape from its pixels.

Why can't a leg be longer than the hypotenuse?

Because c² = a² + b², the hypotenuse's square is the leg's square plus another positive amount, so c is always bigger than either leg. If you enter a leg that is as long as the hypotenuse or longer, there is no real triangle with those sides, and the page asks you to check the numbers.

Sources: OpenStax, Prealgebra 2e, 9.3 Use Properties of Angles, Triangles, and the Pythagorean Theorem; LibreTexts Mathematics, Prealgebra (Arnold), 5.9 The Pythagorean Theorem