Calcamaze

Pythagorean Theorem Calculator

Find the missing side of a right triangle from the other two sides.

Solve for any value — pick what to calculate in the first field

Result

Side c (hypotenuse)
5
Area
6
Perimeter
12

In a right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides. Enter any two sides to find the third, along with the triangle’s area and perimeter.

In any right triangle, the square on the longest side equals the sum of the squares on the other two. That lets you find a missing side from the other two, check whether a corner is square, or work out a diagonal.

What is the Pythagorean theorem?

The Pythagorean theorem says that in a 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, though Babylonian scholars used it more than a thousand years earlier.

It is used whenever you need a straight-line distance: the diagonal of a screen or room, the length of a ladder or rafter, or the distance between two points on a map. Builders use the 3-4-5 triangle to check that corners are square.

How to use the pythagorean theorem calculator

  1. Choose which side to find: the hypotenuse or one of the legs.
  2. Enter the two sides you know.
  3. Read the missing side.

Formula

c^2 = a^2 + b^2

Where a is the side a (leg), b is the side b (leg), c is the side c (hypotenuse).

Choose any value to calculate — the calculator rearranges the formula for you.

Worked examples

Checking a square corner

Calculate
Side c (hypotenuse)
Side a (leg)
6
Side b (leg)
8
Side c (hypotenuse)
10
Area
24
Perimeter
24

Measure 6 ft along one wall and 8 ft along the other. If the corner is square, the diagonal is √(6² + 8²) = √(36 + 64) = √100 = 10 ft.

How high does a ladder reach?

Calculate
Side b (leg)
Side a (leg)
4
Side c (hypotenuse)
13
Side b (leg)
12.3693
Area
24.7386
Perimeter
29.3693

The ladder is the hypotenuse (13 ft) and its foot is 4 ft from the wall. Height = √(13² − 4²) = √(169 − 16) = √153 ≈ 12.37 ft.

Pythagorean triples (whole-number right triangles)

abc (hypotenuse)
345
51213
6810
72425
81517
94041
202129
123537

Checking a corner is square with 3-4-5

Builders check right angles with the 3-4-5 rule: measure 3 units along one side and 4 along the other, and the diagonal between the marks should be exactly 5. For bigger layouts, scale it up to 6-8-10 or 9-12-15. The theorem also gives screen sizes: a 55-inch 16:9 TV is about 47.9 inches wide and 27.0 inches tall.

Common mistakes

  • Using the formula on a triangle without a right angle — it only works for right triangles.
  • Adding the sides before squaring: (a + b)² is not a² + b².
  • Treating a leg as the hypotenuse. The hypotenuse is always the longest side and is opposite the right angle.
  • Adding the legs and then squaring. Square each leg first: √(3² + 4²) = 5, not √((3 + 4)²) = 7.

Frequently asked questions

How do I find the hypotenuse?

c = √(a² + b²). Square both legs, add them, and take the square root.

How do I find a missing leg?

a = √(c² − b²). Choose the leg under Calculate and enter the other leg and the hypotenuse.

Does it work for any triangle?

Only right triangles. For other triangles, use the law of cosines: c² = a² + b² − 2ab cos C, which reduces to Pythagoras when C is 90°.

What are Pythagorean triples?

Whole-number sides that fit exactly, such as 3-4-5, 5-12-13 and 8-15-17. Any multiple of a triple, such as 6-8-10, is also a triple.

Sources

  1. Pythagorean Theorem, Wolfram MathWorld
  2. Prealgebra 2e, 9.3: Use Properties of Angles, Triangles, and the Pythagorean Theorem, OpenStax, Rice University

Last updated · Calculations checked by automated tests· Editorial policy