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
- Pick mode: hypotenuse (have two legs), missing leg (have hypotenuse + 1 leg), or check (have all 3 sides).
- 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.
- 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? +
Why use 3-4-5 specifically? +
What if my measurements give a diagonal that's almost but not exactly 5 ft? +
Does it work for non-right triangles? +
What's the converse? +
Does this work in 3D? +
What's special about isosceles right triangles? +
Why does my framing square use multiples of 3-4-5? +
Heads up: ClutchCalcs gives you fast, accurate results — but always sanity-check critical decisions (medical, financial, structural) with a professional.
Spot a wrong number or want a calculator added? Tell us →