Skip to content
FigureSure
Sign in

Pythagorean Theorem Calculator

Find the missing side of a right triangle with a² + b² = c², step by step: the hypotenuse from two legs, or a leg from the hypotenuse and the other leg. You can also check whether three lengths make a right angle, which is how builders square a corner.
  • Updated
  • Formula shown

What do you want to find?

Labels only: no conversion

Known sides

Results

Hypotenuse c
5
c²
9 + 16
25
Angles
Opposite legs a and b
36.87°, 53.13°
Area
a × b ÷ 2
6units²
Perimeter
12

Hypotenuse c = 5 for legs 3 and 4

Working
StepWorking
1. Write the theoremc² = a² + b²
2. Substitute the legsc² = 3² + 4²
3. Square and addc² = 9 + 16 = 25
4. Take the square rootc = √25 = 5

3, 4 and 5 is a Pythagorean triple: whole-number sides of a right triangle.

How to use the Pythagorean theorem calculator

  1. Choose what to solve for: the hypotenuse, one of the legs, or a check of three sides.
  2. Enter the known sides. The hypotenuse is the longest side, opposite the right angle.
  3. Read the answer and the four-line working underneath it. Whole-number answers that form a Pythagorean triple are pointed out, and exact square roots are simplified (for example √50 = 5√2).

The Pythagorean theorem

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

In any right triangle, the square on the hypotenuse equals the sum of the squares on the two legs. Here a and b are the legs, the two sides that meet at the 90° angle, and c is the hypotenuse. To find c, square both legs, add them and take the square root. To find a leg, subtract the square of the other leg from the square of the hypotenuse, then take the square root. All three lengths must be in the same unit; the answer comes out in that unit too.

The theorem also works backwards (its converse). If three lengths satisfy a² + b² = c², the angle opposite c is exactly 90°. If a² + b² is bigger than c², the largest angle is acute; if it is smaller, that angle is obtuse. The "check" option in the calculator uses this test.

Worked examples

Hypotenuse. With legs of 5 and 12: c² = 5² + 12² = 25 + 144 = 169, so c = √169 = 13.

Missing leg. A 10 ft ladder whose foot is 6 ft from a wall reaches b = √(10² − 6²) = √(100 − 36) = √64 = 8 ft up the wall.

Screen size. TV and monitor sizes are diagonals. A 16:9 screen is a right triangle with legs in the ratio 16 : 9, whose diagonal is √(16² + 9²) = 18.3576 of those units. A 55-inch screen is therefore 55 × 16 ÷ 18.3576 = 47.94 inches wide and 55 × 9 ÷ 18.3576 = 26.96 inches tall.

Squaring a corner with 3-4-5

To check that a deck frame, slab form or wall layout is square, measure 3 units along one side and 4 along the other. If the diagonal between the two marks is exactly 5, the corner is 90°. Larger multiples give more accuracy on big layouts:

Along one sideAlong the otherDiagonal for a square corner
345
6810
91215
121620

Pythagorean triples up to 100

A Pythagorean triple is three whole numbers that fit a² + b² = c². The primitive ones (with no common factor) all come from Euclid's formula, a = m² − n², b = 2mn, c = m² + n², with m > n, no common factor and not both odd. These are all 16 primitive triples with a hypotenuse of 100 or less; multiply any of them by a whole number for more (6-8-10, 9-12-15 and so on).

abcFrom m, n
3452, 1
512133, 2
815174, 1
724254, 3
2021295, 2
1235376, 1
940415, 4
2845537, 2
1160616, 5
1663658, 1
3356657, 4
4855738, 3
1384857, 6
3677859, 2
3980898, 5
6572979, 4

Common mistakes

  • Adding when you should subtract. When the hypotenuse is one of the known sides, the missing leg uses c² − a², not c² + a².
  • Forgetting the square root. c² = 169 is not the answer; c = 13 is.
  • Using it on a triangle without a right angle. For other triangles, use the law of cosines in the triangle calculator.
  • Mixing units. Convert feet and inches to one unit before squaring: 5 ft 6 in is 5.5 ft, not 5.6.

The same idea extends to three dimensions: the space diagonal of a box is √(l² + w² + h²), and the distance between two points on a grid is √((x₂ − x₁)² + (y₂ − y₁)²), which the distance calculator works out for you. To solve the angles and area too, use the right triangle calculator.

Frequently asked questions

What is the Pythagorean theorem?

In a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c². The hypotenuse c is the longest side, opposite the right angle.

How do I find the hypotenuse?

Square each leg, add the results and take the square root. For legs of 5 and 12, c² = 25 + 144 = 169, so the hypotenuse is √169 = 13.

How do I find a missing leg?

Subtract the square of the known leg from the square of the hypotenuse, then take the square root. With a hypotenuse of 10 and a leg of 6, the other leg is √(100 − 36) = √64 = 8.

How can I tell if three sides make a right triangle?

Square the two shorter sides and add them. If the total equals the square of the longest side, the triangle has a right angle. For 7, 24 and 25: 49 + 576 = 625 = 25², so it is a right triangle.

What is a Pythagorean triple?

Three whole numbers that satisfy a² + b² = c², such as 3-4-5, 5-12-13, 8-15-17 and 7-24-25. There are 16 primitive triples with a hypotenuse of 100 or less, and any whole-number multiple of a triple (6-8-10) is also a triple.

Was this calculator helpful?