Nails & Numbers

Home › Decking › Deck Size Calculator

Deck Size Calculator

Area and perimeter, plus the IRC R312.1.1 guard trigger

Deck size calculators give you an area. The useful question is what your dimensions and your height actually oblige you to build, and the answer is that the IRC sets no size limit for a deck at all. What it does set is a height at which a guard becomes mandatory, and the wording of that rule is more subtle than the number suggests.

Deck size and what it obliges

ft
ft
in
in
in
in

Guard trigger and dimensions quoted from IRC R312.1.1 through R312.1.3.

Specification summary

Generated from on . Reopen that address to reproduce these figures exactly.

Entered

Result

deck surface36 in horizontally
Where a guard becomes mandatory, and how it is measured

Deck building prices

As each row states
ItemLowHighUnit
Ground-level deck$10$20per sq ft
Floating deck$20$60per sq ft
Second-story deck$40$50per sq ft
Multi-level deck$30$75per sq ft
Deck labor$15$35per sq ft
Framing labor$9$12per sq ft
Pressure-treated wood$2$5per sq ft, material
Cedar$3$7per sq ft, material
Bamboo$3$10per sq ft, material
Mahogany$8$11per sq ft, material
Tigerwood$7$15per sq ft, material
Ipe$10$20per sq ft, material
Fiberglass and composite$12$22per sq ft, material
Redwood$5$35per sq ft, material
Aluminum$15$20per sq ft, material
Railings$35$210per linear ft
Stairs$25$50per stair
Permit$230$500total
Removing an old deck$5$15per sq ft

Source: HomeAdvisor, how much does it cost to build a deck. Last price check: September 13, 2026.

The source prices a ground-level deck at $10 to $20 per sq ft all in, below its own deck labor rate of $15 to $35 before any material. Its size table starts a 10 by 12 ft deck at $3,600, below a smaller 10 by 10 at $4,000, and it gives the average as $8,317 in one paragraph and $8,217 in another.

Worked example

A 16 ft by 12 ft deck hung on a ledger along one long side, sitting 36 in above the grade.

  1. Area. 192 sq ft. This is the number everybody wants and the one the code has no opinion about.
  2. Open perimeter. 56 ft total less the 16 ft against the house = 40 ft of open edge.
  3. Guard. 36 in is more than 30, so R312.1.1 requires a guard along all 40 ft, 36 in high, passing no 4 in sphere.
  4. Drop the height to 30 in and the guard requirement disappears, which is why so many low decks are built at exactly 30.
  5. The catch. The rule measures to the grade at any point within 36 in of the edge. On a falling lot, 30 in at the house can be 34 in three feet out.

Set the height to 28 in and the verdict passes with a warning: you are inside 6 in of the trigger, and on sloping ground that margin is not yours to keep.

The formula

Area is trivial. The parts worth printing are the perimeter that a guard runs along and the trigger height:

A = LW    open = 2(L + W) − attached    guard required when h > 30 in
A
deck area, sq ft
L, W
length and width, ft
attached
the edge against the house, which needs no guard
h
height from the walking surface to the grade below, measured at any point within 36 in horizontally of the edge

The last term is the whole subtlety. h is not the height at the house, it is the largest height within 36 in of the edge, which on a sloping lot is a different number.

There is no maximum deck size in the IRC

People search for a deck size calculator expecting a limit, and there is not one. The IRC constrains how far a joist may span, how far a beam may span, how deep a footing must go and when a guard is required. It does not cap area.

What area does drive is quantity: joists, boards, footings and fasteners all scale with it, and those are the numbers this page prints alongside the code question.

The code question is height, and R312.1.1 states it in a way that is easy to half-read. Thirty inches is only the first half. The second half is that the measurement is taken to the grade below at any point within 36 in horizontally of the edge, which is what turns a 28 in deck on a falling lot into a 34 in deck.

A great many low decks are built at exactly 30 in for exactly this reason. That is a legitimate design decision, but it leaves no margin, and margin is what a sloping site takes away.

The 30 inch rule, and the half of it everybody drops

Deck area triggers nothing in the code. Deck height triggers a guard, and R312.1.1 states the test in full:

Guards shall be provided for those portions of open-sided walking surfaces, including floors, stairs, ramps and landings that are located more than 30 inches (762 mm) measured vertically to the floor or grade below at any point within 36 inches (914 mm) horizontally to the edge of the open side. Insect screening shall not be considered as a guard.

Routt County, Colorado, reproduction of the 2021 IRC Code and Commentary, 2021 IRC, read from the IRC Code and Commentary

Read the second half. It is not “30 inches off the ground”. It is 30 inches to the grade below at any point within 36 inches horizontally of the edge. On a flat lot those are the same sentence. On a sloping lot they are not, and a deck that measures 26 in at the house can be over 30 in where the ground falls away three feet out. That deck needs a guard, and it is the case inspectors actually fail.

The note about insect screening is there for the same reason: a screened porch over 30 in still needs a real guard behind the screen.

Where a guard is required, two more numbers follow:

Required guards at open-sided walking surfaces, including stairs, porches, balconies or landings, shall be not less than 36 inches (914 mm) in height as measured vertically above the adjacent walking surface or the line connecting the nosings.

R312.1.2, height

Required guards shall not have openings from the walking surface to the required guard height that allow passage of a sphere 4 inches (102 mm) in diameter.

R312.1.3, opening limitations

The stair exception lowers that to 34 in measured from the nosing line, and where the top of the guard doubles as the stair handrail it must be between 34 and 38 in. The 4 in sphere is what sets baluster spacing, and the deck railing calculator solves the layout for it.

Which dimension you call the length changes the frame

Area does not care which way round you type it. The frame cares a great deal, and a 16 ft by 12 ft deck and a 12 ft by 16 ft deck are two different builds out of the same 192 square feet.

Joists span one way and one way only. On a ledger-hung deck they run away from the house, so the dimension perpendicular to the wall is the joist span and the dimension along the wall is the number of joists. Turn the deck through ninety degrees and you have swapped a span problem for a quantity problem.

The consequence is in the span table rather than in the arithmetic. A joist that spans 12 ft may be a different size and species from one that spans 16 ft, and past a certain span you need a second beam and another row of footings. That is not a rounding difference in the price; it is a different deck.

So decide the joist direction before the size, and take both dimensions to the joist calculator in the order they are actually going to be built.

The size that matters to your building department is not the one in the IRC

The IRC sets no maximum deck area, which the calculator says plainly. What it does not do is tell you whether you need a permit, because that is not the IRC's job.

Permit exemptions are written locally and they are usually written against two numbers: an area and a height. Many jurisdictions exempt a small, low, freestanding deck and require a permit for anything attached to the house at any size, on the grounds that the ledger is the connection that fails. This page will not publish a threshold, because there is no national one and a wrong number here would cost somebody a stop-work notice.

What is worth knowing is that the two numbers interact. A deck at 30 in or under needs no guard under R312.1.1 and often falls inside a local exemption as well, so there is a real cliff just above 30 in where the deck gains a guard, a permit and an inspection at the same time. If your design is sitting at 32 in for no particular reason, it is worth asking whether it could sit at 29.

Ask the building department the area and height question before you order anything. It is a two-minute phone call and it is the only source that governs.

Frequently asked questions

Is there a maximum deck size in the building code?
No. The IRC limits joist and beam spans, footing depth and ledger connections, but it does not cap deck area. What your deck size changes is quantity, and what your deck height changes is whether a guard is required.
At what height does a deck need a railing?
More than 30 inches above the floor or grade below, per IRC R312.1.1, measured at any point within 36 inches horizontally of the open edge. A deck at exactly 30 inches does not require one; a deck at 31 does.
How is deck height measured for the guard rule?
Vertically from the walking surface to the floor or grade below, and critically, at any point within 36 inches horizontally of the edge. On a sloping lot the governing measurement is at the low point within that 36 inch band, not at the house.
How tall does a deck guard have to be?
Not less than 36 inches above the walking surface, per R312.1.2. On the open sides of stairs it may be 34 inches measured from a line connecting the nosings, and where the top of the guard doubles as the stair handrail it must be between 34 and 38 inches.
What is the maximum gap in a deck railing?
No opening may allow a 4 inch sphere to pass, per R312.1.3, from the walking surface up to the required guard height. That is what fixes baluster spacing.
Does a screened porch need a guard?
Yes, if the walking surface is more than 30 inches above grade. R312.1.1 says explicitly that insect screening is not a guard.
How many joists does a 16x12 deck need?
Thirteen at 16 inches on center, including the closing joist at the far end. Whether a joist can span 12 ft at that spacing depends on species and size and is set by IRC Table R507.6.

Check these numbers yourself

How every figure here is verified: Sources & Method. Who builds this: , and the method is on About. Found something wrong? Tell us and it gets fixed or removed.

Figures on this page last checked against the source documents on 2026-09-07. Codes are amended locally; confirm against the edition your jurisdiction enforces.

Related calculators

Height is the code question, not area. Guard figures are from the 2021 IRC as reproduced above; confirm the edition your jurisdiction has adopted. This page does not size joists, beams, posts or footings.