Skip to content
Free Deck Board
Blog

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

What is the 3-4-5 rule for a deck? How to square a deck frame with a 3-4-5 triangle, 6-8-10 and 9-12-15 multiples, and matching diagonals for common deck sizes.

Published · 9 min read · By Free Deck Board Calculator · How we research

The 3-4-5 rule for a deck is a way to make a corner exactly 90° using only a tape measure. Mark 3 ft along one side, 4 ft along the other, and move the second side until the distance between the two marks is exactly 5 ft. When it is, the corner is square. Then you confirm the whole frame by checking that its two diagonals match.

It works because of the Pythagorean theorem: 3² + 4² = 9 + 16 = 25 = 5². Any triangle with sides in that ratio has a right angle between the two short sides. Below is the method step by step, the bigger versions builders actually use, the exact diagonals for common deck sizes, and what happens to your decking if you skip this step.

What is the 3-4-5 rule for a deck, step by step

On an attached deck, the ledger (or a line on the house wall) is your starting line. Every other line gets squared off it. On a freestanding deck, pick one long edge, usually the beam line nearest the house, and treat it the same way. The ledger vs freestanding guide covers the difference between the two.

  1. Set the reference line. Snap a chalk line or stretch a string along the ledger or house line where the deck’s corner will be. Mark the corner point.
  2. Mark 3 ft along the house. Measure 3 ft from the corner along the reference line and mark it.
  3. Run the side line out. Stretch a string from the corner out from the house, roughly where the side of the deck will be. Measure 4 ft along it from the corner and mark the string with tape or a marker.
  4. Measure the diagonal. Measure from the 3 ft mark to the 4 ft mark.
  5. Adjust until it reads 5 ft. Swing the far end of the side string left or right. If the diagonal is longer than 5 ft, the corner is more than 90°. If it’s shorter, the corner is less than 90°. Stop when it reads exactly 5 ft.

Either leg can be the 3 or the 4, as long as both measurements start from the same corner point.

As Decks.com describes it, “If it’s exactly 5 feet, your corner is square.”

Use a bigger triangle: 6-8-10 and 9-12-15

Any multiple of 3-4-5 works the same way, and bigger is more accurate. DecksDirect lists 6-8-10, 9-12-15, 12-16-20 and 15-20-25 for larger projects. Decks.com’s layout article uses 6-8-10 for a deck “longer than five foot” (Decks.com layout guide).

Here’s why size matters. Your tape reading always has some error. Say your diagonal reading is off by 1/8”. That small error changes the angle of the corner, and the error grows the farther the side runs. Over a 12 ft deck side, a 1/8” misread on the diagonal throws the far end out by about:

TriangleSide drift over 12 ft from a 1/8” diagonal error
3-4-5 ftabout 5/8”
6-8-10 ftabout 5/16”
9-12-15 ftabout 3/16”
12-16-20 ftabout 1/8”

In metric, the same ratio gives 0.6-0.8-1.0 m, 1.2-1.6-2.0 m or 1.8-2.4-3.0 m triangles. The 1.2-1.6-2.0 m size is a good everyday choice.

So use the biggest triangle your deck allows. A 3-4-5 is fine for a small landing. For a typical deck, 6-8-10 or 9-12-15 is a better habit.

Check both diagonals of the full frame

The 3-4-5 triangle squares one corner. To check the whole rectangle, measure both diagonals, corner to corner. If the two numbers match, the frame is square. Decks.com’s layout guide puts it simply: “measure diagonally corner to corner. The distances should be equal.”

Matching diagonals alone only prove the shape is a rectangle if the opposite sides are already equal. So check in this order:

  1. Make the two long sides the same length.
  2. Make the two short sides the same length.
  3. Compare the diagonals. If one is longer, push the corners at the ends of that diagonal toward each other until the two readings match.

You don’t need the target diagonal, since you’re comparing the two, but it’s a handy cross-check that also catches a frame built to the wrong size. The diagonal is √(length² + width²). For common deck sizes, rounded to the nearest 1/8”:

Deck sizeDiagonal (exact)Diagonal to measure
8 × 10 ft12.81 ft12 ft 9-5/8”
10 × 10 ft14.14 ft14 ft 1-3/4”
10 × 12 ft15.62 ft15 ft 7-1/2”
10 × 16 ft18.87 ft18 ft 10-3/8”
12 × 12 ft16.97 ft16 ft 11-5/8”
12 × 16 ft20.00 ft20 ft 0”
12 × 20 ft23.32 ft23 ft 3-7/8”
12 × 24 ft26.83 ft26 ft 10”
14 × 14 ft19.80 ft19 ft 9-5/8”
14 × 20 ft24.41 ft24 ft 5”
16 × 16 ft22.63 ft22 ft 7-1/2”
16 × 20 ft25.61 ft25 ft 7-3/8”
20 × 20 ft28.28 ft28 ft 3-3/8”

Note the 12 × 16 ft deck: its sides are 3-4-5 times four, so the diagonal comes out at exactly 20 ft. A metric 3.6 × 4.8 m deck works the same way, with a 6.0 m diagonal. The deck sizes page has plans for most of the sizes in this table.

Measure to the same points every time, such as the outside corners of the rim joists, and hook the tape on the same side at both ends.

How close is close enough?

Square-checking guides tell you to get the diagonals equal (Decks.com, DecksDirect). Neither gives a fixed tolerance. In practice, get them as close as you can read the tape, and fix any difference before the joists go in, while the frame can still move.

It helps to know what a difference means. On a 16 × 12 ft deck, a 1” difference between the diagonals means the outer corners are shifted about 5/8” sideways relative to the house. A 1/2” difference is a shift of about 5/16”.

Lay it out with batter boards and string lines

On a new deck you square the layout twice. First with strings, before you dig footings. Then again with the actual frame, before you fasten the joists.

Batter boards are simple frames of two stakes and a crosspiece, set outside each outer corner. You tie your layout strings to them, so the strings stay in place while you dig, and you can untie and retie them without losing your marks. Decks.com sets them “two or three feet to the outside of the mason lines” and recommends real mason line because it “is stronger and doesn’t sag” (Decks.com layout guide).

A typical sequence for an attached deck:

  1. Mark the ends of the ledger on the house.
  2. Run a string out from each end of the ledger to a batter board beyond the deck’s outer edge.
  3. Square each string to the house with a 6-8-10 or 9-12-15 triangle. Slide the string along the batter board’s crosspiece until the diagonal reads right, then mark the spot.
  4. Run a string across the front to mark the beam or rim line, tied to the batter boards at each side.
  5. Check the two diagonals of the string rectangle. Adjust until they match.
  6. Drop a plumb bob from the strings to mark footing centers on the ground, as the Decks.com guide does.

Footings set to a square layout make the rest of the build easier. If the posts are off by a few inches, the beam won’t line up and you end up shimming or re-cutting. The footings and frost depth guide covers sizing and depth once the holes are marked.

When the ledger, rim and outer joists are up, check the diagonals of the actual frame. A temporary diagonal brace screwed across the top of the joists holds it square until the decking goes on.

One thing to watch on attached decks: the house wall itself may not be straight. Stretch a string along the ledger before you square off it. If the wall bows, square off the string, not the siding.

What an out-of-square frame does to the decking

A slightly out-of-square frame is still strong. The problem is how it looks, because decking lines are long, straight and easy to compare.

  • A tapered last row. If you lay the boards square to one edge, they won’t be parallel to the opposite edge. The last board against that edge has to be ripped to a taper. On a 12 ft side that’s 5/8” out, the last board is 5/8” wider at one end than the other, and everyone can see it.
  • A tapering gap at the house. If you instead lay the first board parallel to the rim, the boards meet the house at a slight angle. The gap between the decking and the siding or ledger flashing gets wider from one end to the other. DecksDirect lists gaps between the decking and the ledger and uneven deck boards among the results of an out-of-square frame (DecksDirect).
  • Skewed board ends and borders. Board ends that should form a straight line along the side wander in or out. A picture-frame border makes this worse, because its mitres won’t close at 45°.

All of these are cheap to prevent at the string-line stage and expensive to fix afterward. You can’t easily re-square a deck once the joists are hung and the boards are screwed down.

Before you start framing

Once the layout is square, the next decisions are joist size, spacing and the beam. The how to plan a deck guide walks through the order, and the deck framing calculator counts the joists, rim, ledger, beam and posts for your size.

Frequently asked questions

What is the 3-4-5 rule for a deck?

It’s a way to make a 90° corner with a tape measure. Measure 3 ft along one side from the corner and 4 ft along the other, then adjust until the distance between the two marks is exactly 5 ft. It works because 3² + 4² = 5², so the triangle always has a right angle.

Is 6-8-10 better than 3-4-5?

Yes, for most decks. It’s the same triangle at twice the size, so a small tape-reading error has half the effect on the angle. On a 12 ft side, a 1/8” misread on the diagonal leaves the far end about 5/8” out with 3-4-5, but only about 5/16” with 6-8-10. Use 9-12-15 or larger if the deck has room.

What should the diagonal of a 12 × 12 deck be?

About 16 ft 11-5/8”. It’s √(144² + 144²) inches, or 203.65”. A 12 × 16 deck has a diagonal of exactly 20 ft, and a 16 × 20 deck about 25 ft 7-3/8”. The two diagonals should match each other, whatever the size.

How do I square a deck that’s already framed?

Make sure opposite sides are the same length, then measure both diagonals. If one is longer, push the corners at the ends of the longer diagonal toward each other, using a clamp, a come-along or a temporary brace, until the readings match. Then screw a diagonal brace across the joists to hold it until the decking goes on. This only works before the decking is fastened.

Once your layout is square, run your deck’s size through the deck framing calculator to get the joist, beam and post count.

Keep reading