Pythagorean Theorem Calculator

Find the missing side of a right triangle with a² + b² = c². Also shows both angles, the area and the perimeter, with the working.

Reviewed · How we build and check our calculators

Your details

Which side do you want to find?

Hypotenuse c

5

c = √(a² + b²)

Side a
3
Side b
4
Hypotenuse c
5
Angle opposite a
36.87°
Angle opposite b
53.13°
Area
6
square units
Perimeter
12

The two angles that are not the right angle always add up to 90°.

How the pythagorean theorem calculator works

In a right triangle, the square of the longest side (the hypotenuse) equals the sum of the squares of the other two. Enter any two sides to find the third, plus the angles, area and perimeter.

Formula

a² + b² = c², so c = √(a² + b²) and a = √(c² − b²).

  1. 1

    Square the two short sides

    For sides a = 3 and b = 4: 3² = 9 and 4² = 16.

  2. 2

    Add the squares

    9 + 16 = 25. This is c².

  3. 3

    Take the square root

    √25 = 5, so the hypotenuse is 5. The area is 3 × 4 ÷ 2 = 6 square units.

Worked example

The calculator opens with these values

Which side do you want to find?
Hypotenuse c
Side a
3
Side b
4

Hypotenuse c

5

Common Pythagorean triples

Every multiple of a triple is also a triple: 3-4-5 gives 6-8-10, 9-12-15 and 30-40-50. If your two sides are a multiple of a row below, the hypotenuse is the same multiple of c, with no square root needed.

Whole-number right triangles and their smallest angle
Side aSide bHypotenuse cAngle opposite a
34536.87°
5121322.62°
8151728.07°
7242516.26°
20212943.6°
12353718.92°
9404112.68°
11606110.39°

Checking a square corner with 3-4-5

Builders, gardeners and tilers use the theorem backwards: if the three sides fit a² + b² = c², the corner between a and b is exactly 90°.

  • Mark 3 ft along one edge from the corner and 4 ft along the other. The diagonal between the marks should be 5 ft.
  • Scale up for a large layout, such as 6-8-10 ft or 9-12-15 ft. Over a longer distance a small error is easier to see.
  • A diagonal longer than 5 ft means the corner is wider than 90°; a shorter one means it is tighter.
  • Any unit works: 30-40-50 cm suits a picture frame, a shelf or a tile layout.

Distance between two points and diagonals

On a graph, the horizontal and vertical gaps between two points are the legs of a right triangle, so the distance is d = √((x₂ − x₁)² + (y₂ − y₁)²). From (1, 2) to (7, 10) the gaps are 6 and 8, so the distance is 10.

The same rule gives the diagonal of any rectangle: a 12 ft by 16 ft room measures 20 ft from corner to corner. For a box, add the third side under the root: √(l² + w² + h²).

Common questions

Which side is the hypotenuse?

The side opposite the right angle. It is always the longest side, so when you solve for a or b, the hypotenuse you enter must be longer than the other side.

Does the theorem work for any triangle?

No, only for triangles with a 90° angle. For other triangles use the law of cosines: c² = a² + b² − 2ab × cos(C).

What is a Pythagorean triple?

Three whole numbers that fit a² + b² = c², such as 3-4-5, 5-12-13 and 8-15-17. Builders use 3-4-5 to mark a square corner.

Which units should I use?

Any unit, as long as both sides use the same one. The answer comes out in that unit, and the area in its square.

Add this calculator to your website

Free for blogs, schools and businesses. Paste this code into your page; the calculator works inside it, with no ads and no tracking. Please keep the credit line.