ClutchCalcs

Maker & Reference

Pythagorean Theorem Calculator

a² + b² = c² — the most-used theorem in carpentry, construction, surveying, and trigonometry. Need the diagonal of a room before laying flooring? Squaring up a deck or foundation? Finding the rafter length given run and rise? Checking if a corner is actually 90°? This calculator solves all three modes: hypotenuse from two legs, missing leg from hypotenuse + one leg, or right-triangle check from three sides. Plus perimeter and area as bonus output. The 3-4-5 method that framers use to square up corners is just this theorem in disguise.

Result

Formula
Perimeter
Area

Real-world applications

  • Squaring up walls / decks / foundations: mark 3 ft on one wall, 4 ft on the perpendicular wall, check that the diagonal is exactly 5 ft. If yes, the corner is 90°.
  • Stair rise/run: a stair with 7" rise per 11" run has a tread diagonal of √(7² + 11²) = 13.04".
  • Roof rafter length: a 6/12 pitch roof with 12-ft run = rise of 6 ft + horizontal run of 12 ft. Rafter length = √(6² + 12²) = 13.42 ft. Add overhang and seat-cut allowance.
  • Diagonal of a rectangular room: 14 ft × 18 ft room → diagonal = √(196 + 324) = 22.8 ft. Useful for moving large furniture.
  • TV size: TVs are measured by diagonal. A "55-inch TV" has 47" wide × 27" tall screen — √(47² + 27²) = 54.2 inches diagonal (close to 55).
  • Wire/cable length: running cable across a room? Diagonal + slack = total cable needed.

Common Pythagorean triples

Sets of integers that satisfy a² + b² = c² exactly:

  • 3-4-5 (and multiples: 6-8-10, 9-12-15, 12-16-20). The carpenter's classic.
  • 5-12-13 (and 10-24-26)
  • 8-15-17
  • 7-24-25
  • 20-21-29
  • 9-40-41

The 3-4-5 rule is the workhorse of framing because the math is in your head: 3 ft + 4 ft + diagonal 5 ft = square. Want bigger triangle for more accuracy on long walls? Use 6-8-10 or 9-12-15.

How to use this calculator

  1. Pick mode: hypotenuse (have two legs), missing leg (have hypotenuse + 1 leg), or check (have all 3 sides).
  2. Enter sides: labels a, b, c. c is the hypotenuse (longest side). Units don't matter as long as all sides use the same unit.
  3. Output: result, formula used, perimeter, area.

Common scenarios

Squaring a deck frame, 12 ft × 16 ft. Expected diagonal: √(144 + 256) = 20 ft. Measure both diagonals on the actual frame — if they match (both ~20 ft), the frame is square.

Rafter length for 8/12 pitch shed, 10-ft wide. Run = 5 ft (half the width). Rise = 5 × (8/12) = 3.33 ft. Rafter = √(5² + 3.33²) = 6 ft. Add 6" for overhang = 6.5 ft total rafter length.

Length of ladder needed to reach a 20-ft eave standing 6 ft from the wall. Vertical 20 + horizontal 6 → ladder length = √(400 + 36) = 20.9 ft. Need a 24-ft ladder (closest standard size) for safe overlap.

FAQ

Why is it called the Pythagorean Theorem? +
Greek mathematician Pythagoras (~500 BC) is credited with the formal proof, though Babylonian, Egyptian, and Chinese mathematicians knew the relationship hundreds of years earlier. The theorem has hundreds of distinct proofs accumulated over 2,500 years.
Why use 3-4-5 specifically? +
It's the smallest Pythagorean triple of integers, making mental math trivial. Pull a 3-ft tape one way, 4-ft tape perpendicular, and check that the diagonal hits exactly 5 ft. If it does, the corner is exactly 90°. For longer walls, scale up: 6-8-10 or 9-12-15.
What if my measurements give a diagonal that's almost but not exactly 5 ft? +
The corner is approximately square, off by the proportional error. If 3-4 measurements give 5.05 instead of 5.00, the angle is about 89.5° instead of 90° (off by 0.5°). For most framing work that's fine. For tight tolerance (cabinet boxes, machinery), get it dead-on.
Does it work for non-right triangles? +
No. For non-right triangles, use the Law of Cosines: c² = a² + b² – 2ab·cos(C). The Pythagorean Theorem is the special case where angle C is 90°, so cos(C) = 0 and the last term drops out.
What's the converse? +
If a triangle's sides satisfy a² + b² = c², then the angle opposite c is exactly 90°. This is what "check mode" uses — confirms whether three given sides form a right triangle.
Does this work in 3D? +
Yes — the 3D version is d = √(x² + y² + z²). For example, the diagonal of a 4×5×6 box = √(16+25+36) = √77 = 8.77. Useful for diagonal moves through a building or fitting things into shipping containers.
What's special about isosceles right triangles? +
An isosceles right triangle has two equal legs (a = b). Hypotenuse = a×√2 ≈ a×1.414. The square's diagonal formula uses this: diagonal = side×√2. A 10-ft square room has a 14.14-ft diagonal.
Why does my framing square use multiples of 3-4-5? +
The blade and tongue of a framing square aren't directly 3-4-5, but stair gauges (small clamps) let you set 3-4 or 6-8 fence stops for laying out rafters, stair stringers, and squaring up walls quickly. The whole point of the framing square is geometric math on lumber.