
What Is the 3-4-5 Rule for Decking?
The 3-4-5 rule is the fastest way to get a perfect 90-degree corner on a deck frame — no fancy tools required. It is the Pythagorean theorem turned into a job-site shortcut, and here is exactly how deck builders use it.
Every square deck starts with one question: are the corners actually 90 degrees? Eyeballing it does not work — a frame that is even slightly out of square will show up in crooked deck boards, gaps at the ledger, railings that do not line up, and stairs that lean. The 3-4-5 rule is the simple, centuries-old method professional carpenters use to get it right before the first joist hanger goes on.
The 3-4-5 Rule Explained
The 3-4-5 rule is a practical application of the Pythagorean theorem: in any right triangle, the square of the longest side — the hypotenuse — equals the sum of the squares of the other two sides. When the three sides of a triangle measure 3, 4, and 5 in any unit, the angle between the 3 side and the 4 side is exactly 90 degrees, because 3 squared plus 4 squared (9 plus 16) equals 25, which is 5 squared.
That is the whole trick. Measure 3 feet along one edge, 4 feet along the edge that should be perpendicular, and if the diagonal between those two points measures exactly 5 feet, the corner is square. If the diagonal is longer than 5 feet, the corner is open more than 90 degrees; if it is shorter, the corner is closed tighter than 90 degrees.
Why Square Framing Matters
A deck that is out of square does not just look slightly off — the error compounds. Run deck boards across an out-of-square frame and the gap between the boards and the rim joist grows from one end to the other, an obvious flaw on a finished deck. Railing sections built for a square frame will not fit. Stair stringers cut to a square layout will land wrong. And where the deck meets the house, an out-of-square frame can leave a wedge-shaped gap at the ledger board.
Getting the frame square at layout costs a few minutes. Fixing an out-of-square deck after the boards are down costs a rebuild.
Applying It to a Deck: A Real-World Example
Here is how we use it on a typical Northern Virginia deck build. Say we are framing a deck off the back of a house and the ledger board is already fastened to the home — that ledger is our known straight reference line.
From one end of the ledger, we measure out along where the side of the deck will run. We mark 4 feet along the ledger and 3 feet out along the side. Then we measure the diagonal between those two marks and adjust the side beam in or out until that diagonal reads exactly 5 feet. Now that side is perfectly perpendicular to the house. We repeat the process at the other end, then confirm the whole frame with a full diagonal check. On a real deck the carpenter scales the numbers up — which is where larger multiples come in.
Use Larger Multiples for Bigger Decks
The 3-4-5 rule works at any scale, and bigger is more accurate. On a small triangle, a measuring error of a quarter inch throws the angle off significantly. On a large triangle, that same quarter inch barely registers.
So on a full-size deck, carpenters use multiples of 3-4-5. 6-8-10 doubles the base ratio and works well on mid-size frames. 9-12-15 triples it and is common on larger decks. 12-16-20 quadruples it and is used on big frames where maximum accuracy matters. All of these are the same right triangle, just larger — use the biggest multiple that fits the deck you are laying out.
Batter Boards and String Lines
Before the frame exists, the deck is just an idea on the ground — and that is where batter boards and string lines come in. Batter boards are temporary L-shaped stakes set just outside each corner of the planned deck. Mason’s string is run between them to represent the exact outside edges of the deck frame.
Because the strings can slide along the batter boards, the carpenter can fine-tune the layout: run the strings, check each corner with the 3-4-5 method, nudge a string until the diagonal measurement is perfect, and lock it. The string lines then mark exactly where footings get dug and where beams land — all squared before anyone touches a shovel.
The Diagonal Check: Verifying the Whole Frame
The 3-4-5 rule squares one corner at a time. To confirm an entire rectangular frame is square, carpenters use one more check: measure both diagonals. In any true rectangle, the two diagonals — corner to opposite corner — are exactly equal in length. Measure one diagonal, measure the other, and if the two numbers match, the frame is square. If they differ, the frame is racked, and you adjust until they are equal.
We use both methods together: 3-4-5, or a larger multiple, to set each corner during layout, and the equal-diagonals check to verify the assembled frame before fastening everything down. It is a thirty-second check that prevents the most common framing mistake in the trade.
When the House Itself Is Not Square
Here is the wrinkle the math does not mention: sometimes the house is not square, the existing patio is not square, or the lot lines force an irregular shape. A good deck builder uses the 3-4-5 rule to establish true square, then makes a judgment call — whether to build the deck truly square and absorb the difference in a trim board, or to intentionally follow the house line so the deck looks intentional. That decision is experience, not arithmetic, and it is one of the things that separates a professional build from a DIY guess.
For more on what goes into a structurally sound frame, see our guides on choosing 2x8 or 2x10 joists and how deep deck footings need to be in Virginia.
Built Square, Built Right
The 3-4-5 rule is simple, but using it well — at the right scale, with proper batter boards, confirmed by diagonal checks, and adjusted for a house that is not perfectly square — is craftsmanship. As a licensed Northern Virginia deck builder, Loudoun Decks squares every frame before a fastener goes in, whether we are your deck builder in Fairfax, VA or building a new deck in Loudoun or Prince William County.
Planning a new deck? Call Loudoun Decks at 571-655-7207 or visit ldndecks.com/contact for a free design consultation.
Frequently Asked Questions
What is the 3-4-5 rule in decking?
It is a way to confirm a corner is exactly 90 degrees. Measure 3 units along one side and 4 along the other; if the diagonal between them is 5 units, the corner is square. It is the Pythagorean theorem applied on the job site.
Why is the 3-4-5 rule used to square a deck?
Because a deck frame that is out of square produces crooked boards, ill-fitting railings, and gaps at the ledger. The 3-4-5 rule gives an accurate 90-degree corner with nothing but a tape measure.
Can I use bigger numbers than 3-4-5?
Yes, and you should on a real deck. Multiples like 6-8-10, 9-12-15, and 12-16-20 are the same right triangle at a larger scale, and bigger triangles make small measuring errors far less significant.
What is the diagonal check for a deck frame?
Measuring both diagonals of a rectangular frame corner to corner. If the two diagonals are equal, the frame is square. It is used together with the 3-4-5 rule to verify the whole assembled frame.
What are batter boards used for?
Temporary stakes set outside each deck corner, with string lines stretched between them to mark the deck’s exact edges. The strings can be nudged until every corner checks square before footings are dug.
What if my house is not square?
It happens often. A builder uses the 3-4-5 rule to find true square, then decides whether to build the deck truly square or follow the house line so the result looks intentional. That call comes from experience.
This article is general construction guidance. Structural requirements, permit thresholds, and inspection standards vary by county and HOA across Northern Virginia — always confirm current local code with your building department before starting work.
Plan Your Northern Virginia Deck Project With Loudoun Decks
Get a free, no-pressure consultation from a licensed Northern Virginia deck builder. Call (571) 655-7207 or visit ldndecks.com/contact.
Get a Free EstimateEverything Your Outdoor
Space Needs
From ground-up deck construction to full outdoor living spaces, every project is custom-designed for your home, fully permitted, and backed by our warranty.

Custom Deck Builder
Transform your backyard with a custom-designed deck. As a Trex Platinum builder, we offer the best warranties and craftsmanship in Northern Virginia.

Deck Resurfacing & Repair
Save 40% on costs with our expert deck resurfacing and repair. We refresh your existing frame with modern composite boards and railings.

Patio Contractor Services
Professional bluestone and paver patio installation. We create durable, beautiful ground-level outdoor living spaces that last a lifetime.
Local Expertise Across Northern Virginia
Loudoun Decks is a trusted deck builder serving Loudoun County, Fairfax County, Prince William County, Arlington, and Stafford.
Guides Northern Virginia Homeowners Are Reading
Pergola & Shade Guide
Attached vs freestanding costs and permits.
Outdoor Living Contractor
Decks, patios, porches and backyard systems planned together.
Paver vs Flagstone
Cost and durability comparison for Virginia patios.
Eco-Friendly Decking Guide
Recycled materials and sustainability facts.
Pool Deck Design & Safety
Slip-resistant materials for Northern Virginia pools.


