MathsGeometry

Pythagorean Theorem
calculator.

Find the third side of a right triangle, or check if a corner is square.

How it’s worked out

A right triangle has one 90° corner. The two sides that meet there are the legs, a and b. The side across from the corner is the hypotenuse, c, and it is always the longest side. The theorem links the three:

a2+b2\displaystyle a^2 + b^2=c2\displaystyle {}= c^2

In words, the square drawn on the hypotenuse has the same area as the two squares on the legs put together. The drawing under the tool shows exactly that, to scale. For legs 9 and 12, c² = 9² + 12² = 81 + 144 = 225, and the hypotenuse is √225 = 15.

To find a missing side, the tool rearranges the theorem. The hypotenuse adds the squares; a leg subtracts the known leg's square from the hypotenuse's:

c\displaystyle c=a2+b2\displaystyle {}= \sqrt{a^2 + b^2}a\displaystyle a=c2−b2\displaystyle {}= \sqrt{c^2 - b^2}

For a leg, the engine works out (c − b)(c + b) instead of c² − b². The two are equal, but the first keeps its accuracy when the leg is very short next to the hypotenuse.

When both known sides are whole numbers, the number under the root is whole too, so you also get an exact answer. The tool pulls out every square factor: two legs of 10 give c = √200 = 10√2, about 14.1421. Some roots, such as √721, have no square factor and stay as they are.

The theorem also runs backward (Euclid, Elements I.48). Square the two shorter of three lengths and compare the total with the square of the longest. Equal means a right angle. A larger total means every angle is under 90°, and a smaller one means the corner opposite the longest side is over 90°. The Check task does this and also gives the real angle from the law of cosines.

The other two tasks reuse the same rule. Euclid's formula builds whole-number triples from any whole numbers m > n: m = 4 and n = 1 give 8, 15, 17. A box applies the theorem twice, first across the floor and then up to the far top corner:

d\displaystyle d=l2+w2+h2\displaystyle {}= \sqrt{l^2 + w^2 + h^2}

A box 24 by 18 by 16 inches has a floor diagonal of 30 in and a space diagonal of 34 in, the longest rod that fits inside.

Worked examples

How tall is a 55 inch TV?

Maya is buying a TV for an alcove. Screen sizes are measured on the diagonal, so her 55 inch screen has c = 55, and the spec sheet says it is 48 inches wide. The height is the missing leg.

The tool subtracts the squares: a² = c² − b² = 3,025 − 2,304 = 721, so a = √721 = 26.85 in. The root does not simplify, because 721 has no square factor. That is the glass alone, about 26.9 inches, so Maya adds the frame before she measures the alcove.

Open this example in the tool

How high does a 16 foot ladder reach?

Sam sets a 16 ft ladder with its foot 4 ft out from the wall. The ladder is the hypotenuse and the gap at the floor is one leg, so the reach up the wall is the other leg. The squares give a² = c² − b² = 256 − 16 = 240, so the reach is √240 = 4√15, or 15.49 ft.

The angle with the ground is 75.52°. That is the angle OSHA's rule for leaning ladders aims at: one foot out for every four feet of working length (29 CFR 1926.1053). Moving the foot out lowers both the reach and the angle, and the what-if table under the tool shows how fast.

Open this example in the tool

Is the deck frame square?

Luis marks 6 ft along one joist and 8 ft along the other, then measures 10.1 ft between the marks. This is the 3-4-5 check scaled up by 2. The two short sides give 6² + 8² = 100, but the diagonal gives 10.1² = 102.01.

The total is smaller, so the corner is obtuse: it measures 91.2°, opened about 1.2° past square. A square corner needs a diagonal of exactly 10 ft, so Luis pushes the frame until the tape reads 10 ft.

Open this example in the tool

Reading your result

The missing side comes in the unit you picked. With Exact on and whole-number sides, it shows as a root, such as 4√15 in the ladder example, with the decimal beside it. Use the root for homework and the decimal for cutting or buying. With decimal sides, only the decimal is shown.

A whole-number answer means your three sides form a Pythagorean triple, such as 3, 4, 5 or 5, 12, 13. Multiples of a triple are triples too, so 9, 12, 15 is 3, 4, 5 times three.

The two angles beside the answer always add up to 90°. Angle A sits opposite leg a and angle B opposite leg b. The bigger angle faces the longer leg.

In the Check task, small errors in a tape reading show up as small changes in the corner. For marks at 6 and 8 ft, this is what each diagonal means:

Diagonal (ft)a² + b²c²Corner
9.810096.04acute, 87.64°
9.910098.01acute, 88.81°
10100100right, 90°
10.1100102.01obtuse, 91.2°
10.2100104.04obtuse, 92.41°

A tenth of a foot, about an inch and a quarter, moves this corner by roughly 1.2°. On a long wall that shows, so measure the diagonal to the nearest eighth of an inch.

A near miss is still a miss. The tool calls a corner right only when the two sides of the equation agree to about one part in a billion. Sides 1, 1 and 1.4142 give 2 against 1.999962, so the result is acute: 1.4142 is close to √2 but not equal to it.

Common mistakes

  • Putting the hypotenuse in a leg box. c is the side across from the right angle. On a ladder it is the ladder itself, and on a TV it is the diagonal. If you enter a leg longer than c, the tool stops and says so.
  • Adding when you should subtract. For a missing leg, take the known leg's square away from c². Adding gives √(55² + 48²) = 73 for the TV, longer than its own diagonal, which is impossible.
  • Using it on a corner that is not 90°. The theorem only holds for right triangles. For any other triangle use the law of cosines, which the triangle solver handles.
  • Mixing units. 6 ft 3 in is 6.25 ft, not 6.3 ft. Convert every side to one unit first, or switch the unit box and let the tool convert what you typed.
  • Rounding before the square root. Keep the full value of a² + b² until the last step. Rounding a square early can move the answer in the second decimal place.

Questions people ask

Square both legs, add them and take the square root. For legs of 9 and 12 that is √(81 + 144) = √225 = 15. Leave the hypotenuse box empty and the calculator does it for you.

Sources