Lumber Calculator

The 3-4-5 Rule: How to Square a Deck Frame

Updated October 2026

The 3-4-5 rule is the fastest way to make a deck corner exactly 90°. It comes from the Pythagorean theorem: a triangle with sides of 3, 4 and 5 units always has a right angle between the 3 and 4 sides.

How to use it

  1. From the corner, measure 3 ft along the ledger (or the first rim board) and mark it.
  2. From the same corner, measure 4 ft along the joist or string line running out from the house and mark it.
  3. Measure the diagonal between the two marks.
  4. If the diagonal is exactly 5 ft, the corner is square. If it’s longer, the angle is more than 90°: swing the joist or string inward. If it’s shorter, swing it outward. Adjust until it reads 5 ft.

Use bigger multiples for bigger decks

Any multiple of 3-4-5 works, and longer measurements are more accurate:

MultipleSide ASide BDiagonal
×13 ft4 ft5 ft
×26 ft8 ft10 ft
×39 ft12 ft15 ft
×412 ft16 ft20 ft

On most decks, use 6-8-10 or 9-12-15. An error of ¼” over 5 ft is much bigger, in angle, than ¼” over 15 ft.

Double-check with diagonals

Once the outer frame is built (or the string lines are set for the footings), measure both corner-to-corner diagonals. In a true rectangle they’re equal. If one is longer, push the frame along that diagonal until they match.

For any rectangle you can check the target diagonal: diagonal = √(width² + depth²). A 12x16 deck should measure exactly 20 ft corner to corner.

When to square

  • Laying out footings: set string lines from the ledger with batter boards, square them with 3-4-5, then mark footing centers.
  • Setting the beam: check the beam is parallel to the ledger by measuring at both ends.
  • Before decking: confirm the frame diagonals one more time, because racking is easy to fix before the boards go down.

Next step

With the frame square, use the deck calculator to get your footing count, joist and beam sizes, and a full materials list.