Math & Science

Pythagorean Theorem Calculator

Find the missing side of any right triangle. Enter any two sides to solve for the third.

a² + b² = c²
About this calculator

I use the Pythagorean theorem more than any other piece of high school math, for woodworking, checking if a framed wall is square, calculating diagonal distances, and confirming right angles in any construction layout. It never stops being useful.

The 3-4-5 rule is the classic construction trick: a triangle with sides 3, 4, and 5 (or any multiple) is always a right triangle. It's how builders check square corners without a level or angle tool.

The theorem and its proof

The Pythagorean theorem states that 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: a² + b² = c². It's one of the most proven theorems in mathematics, there are over 370 documented proofs, ranging from simple geometric rearrangements to algebraic derivations. Euclid's proof in Elements (300 BCE) is the most famous.

Practical applications

Beyond geometry class, the Pythagorean theorem appears everywhere in practical work. Construction and carpentry: checking if corners are square by measuring the diagonal. A 4×4 foot corner has a diagonal of exactly 5.66 feet if it's truly square. Navigation: finding straight-line distance between two points on a grid. Screen size: screen sizes are measured diagonally, a 16×9 aspect ratio screen labeled "55 inch" has a width of 47.9 inches and height of 27.0 inches. Roofing: calculating rafter length from rise and run.

The 3-4-5 method for squaring corners

When laying out any right-angle structure, a deck, a foundation, a room, the 3-4-5 method verifies square corners without specialized tools. Measure 3 feet along one wall from the corner, mark it. Measure 4 feet along the adjacent wall from the same corner, mark it. Measure between the two marks. If the distance is exactly 5 feet, the corner is square. Multiples work equally well: 6-8-10, 9-12-15, or any scale of 3-4-5.

Pythagorean triples

A Pythagorean triple is a set of three positive integers that satisfy a² + b² = c². The most common: 3-4-5, 5-12-13, 8-15-17, 7-24-25. Any multiple of these also forms a right triangle: 6-8-10, 10-24-26. These triples are especially useful in construction because they allow exact integer measurements rather than decimal approximations.

Frequently asked questions

Which side is the hypotenuse?

The hypotenuse is always the longest side of a right triangle, the side directly opposite the right angle. In a² + b² = c², c is always the hypotenuse. If you're entering two legs (sides adjacent to the right angle), enter them as a and b and leave c blank.

Does this work in three dimensions?

Yes, via extension. The diagonal of a rectangular box with dimensions l, w, h is the square root of (l² + w² + h²), a three-dimensional version of the theorem applied twice.

What if my triangle isn't a right triangle?

Use the law of cosines: c² = a² + b² − 2ab·cos(C), where C is the angle between sides a and b. The Pythagorean theorem is a special case of the law of cosines where the angle is 90° (cos 90° = 0).

Related calculators