Deck Calculator

Enter your deck's length and width and get the whole materials list: deck boards, joists, rim, ledger, beam, posts, footings and fasteners, with every joist, beam, post and footing size read from the 2021 IRC deck tables and every step shown with your numbers.

Put this calculator on your website for free

Copy one snippet and give your visitors a working Deck Calculator.

How the deck calculator works

A deck is two jobs wearing one name. The part you see, the boards, is a counting problem: rows, lengths, screws. The part you stand on, the frame, is a code problem, and the good news is that the code has already done the engineering for an ordinary deck. The International Residential Code publishes prescriptive tables in Section R507: how far each joist size may span, how far each beam may span between posts, how big each footing must be for the load it carries, and how tall each post may stand. This page reads those tables for your deck and then counts everything you need to buy.

Tell it the deck's size, which way the joists run, whether it bolts to the house or stands on its own, your lumber and your load. It works out the joist span the way the code measures it, picks the smallest joist the table allows (or checks the one you chose), counts the joists, lays out the board rows, sizes the beam's posts and footings, spaces the ledger bolts, and shows every step with your own numbers. All tables come from the 2021 IRC, and we checked them cell by cell against the 2024 edition.

The formula

joist span = width − ledger (1.5 in) − beam width − cantilever
joists = (length ÷ spacing, rounded up) + 1
board rows = (width + gap) ÷ (board width + gap), rounded up
boards to buy = rows × boards per row × (1 + waste), rounded up
effective joist span for the beam = joist span × factor from IRC Table R507.5(5)
posts per beam = (beam length ÷ allowed beam span, rounded up) + 1
area on each footing = post spacing × (half the joist span + beam + cantilever)

The width is the dimension the joists run across and the length is the one the boards and beam run along. A freestanding deck subtracts a beam at each end instead of a ledger. The joist size comes from Table R507.6, the beam span from Tables R507.5(1) to R507.5(4), the footing from Table R507.3.1 and the post from Table R507.4, always reading the next column up rather than interpolating, which can only make a member bigger. Quantities you buy round up.

Worked example

A 12 x 16 ft deck bolted to the house along its 16 ft side, framed in Southern pine at 16 in on center, with a two-ply 2x10 beam at the outer edge, 5/4 x 6 boards in 16 ft lengths and face screws. The 12 ft width loses 1.5 in to the ledger and 3 in to the beam, so the joists span 11 ft 7.5 in. Table R507.6 lets a 2x8 span 11 ft 10 in, so the joists are 2x8s, with 2.5 in to spare. 192 in of length divided by 16 is 12 spaces, so 13 joists, each cut from a 12 ft board.

The boards: (144 + 0.19) ÷ (5.5 + 0.19) = 25.35, so 26 rows, one 16 ft board each, and 26 plus 10% is 28.6, so 29 boards and 676 screws. The beam: 11 ft 7.5 in × 0.66 = 7.67 ft of effective joist span, read in the 8 ft column, where a two-ply 2x10 may span 9 ft, so the 16 ft beam needs 3 posts, 8 ft apart. The middle post carries 8 ft × 6.06 ft = 48.5 sq ft, which Table R507.3.1 (60 sq ft row, 1,500 psf soil) answers with a 19 in round footing, 6 in thick. The 2x8 ledger takes 14 half-inch lag screws at 15 in or 8 through-bolts at 29 in. So: about 29 deck boards, 13 joists and 3 footings.

Why a 12 foot deck can use 2x8s (by 2.5 inches)

A joist span is not the deck's width. IRC Figure R507.6 measures it from the face of the ledger to the face of the beam, so on a 12 ft deck with the beam at the edge, the ledger and a two-ply beam take 4.5 in and the joists span 11 ft 7.5 in. That sneaks a Southern pine 2x8 in under its 11 ft 10 in limit at 16 in on center. Switch the lumber to Douglas fir, hem-fir or spruce-pine-fir, whose 2x8 reaches 11 ft 1 in, and the same deck needs 2x10s. The table is a limit, not a recommendation: a deeper joist deflects less, so a 2x10 will feel firmer underfoot even where a 2x8 is allowed. When the margin is this thin, measure your actual layout before you buy, because an inch here or there changes the answer.

The cantilever trade: easier joists, harder beam

Move the beam 2 ft in from the edge and let the joists overhang it, and the joist span on the 12 x 16 example drops from 11 ft 7.5 in to 9 ft 7.5 in, which is why builders love a cantilever. But the beam now carries the overhang too, and Table R507.5(5) charges for it. The overhang is 21% of the back span, between the table's one-sixth and one-quarter rows, and reading the one-quarter row sizes the beam for the full 9 ft 7.5 in instead of 66% of it, so its effective joist span grows from 7.67 ft to 9.63 ft and a two-ply 2x10 may span 8 ft instead of 9. The load on each footing rises from 48.5 to 56.5 sq ft. The joists got easier and the beam got harder, which is how structures usually bargain.

The overhang has a ceiling, too. Read across the cantilever columns of Table R507.6 and the numbers climb in step with the back span until the joist runs out of strength: a 4 ft back span allows 1 ft, a 16 ft back span allows 4 ft on a Southern pine 2x12. The table never lets a cantilever exceed a quarter of the span behind it: a loaded overhang tries to lift the other end of the joist, which is also why the code wants the house connection to resist uplift (R507.8). On the example deck a 2.5 ft overhang is too much for a 2x8: at a back span of 9 ft 1.5 in the table allows 2 ft.

Why deck boards come in 12, 16 and 20 foot lengths

Every butt joint in a deck board has to land on a joist, and 48 in is the smallest length that 12, 16 and 24 all divide evenly. So any board length that is a multiple of 4 ft puts its ends on a joist at every standard spacing, which is a good reason to plan in 12, 16 and 20 ft boards. The calculator also compares them for your deck. On the 16 ft example, 16 ft boards need 29 boards and 464 linear feet with no joints at all; 12 ft boards need 39 boards and 468 linear feet with 26 joints; 20 ft boards need 29 boards but 580 linear feet, because every one loses 4 ft to the saw. The cheapest length is usually the one that matches the deck, or divides into it.

The house is holding up half your deck

Unbolt the 12 x 16 example from the house and it needs a second beam where the ledger was, so the footings double from 3 to 6. That is the quiet job a ledger does, and it is why the ledger is the connection to get exactly right. The code wants it at least a 2x8, bolted into a solid band joist, never hung on brick or stone veneer, flashed so water cannot reach the house framing, and fastened with lag screws or through-bolts at the spacing Table R507.9.1.3(1) gives for your joist span, which the calculator counts for you. A freestanding deck trades that connection for more posts and footings, and it has to resist sideways sway on its own, which the IRC deck tables do not size, so ask your building department what bracing it expects.

Footings: the size is in a table, the depth is in your town

Table R507.3.1 sizes each footing from the deck area its post carries and the bearing strength of your soil. It stops at 160 sq ft per post, and extrapolating past it is not permitted, but the beam tables get there first: we ran every beam, lumber group, load, spacing and cantilever the tables allow, and the most deck any one post ends up carrying is about 120 sq ft. If you do not know your soil, we use 1,500 psf, the lowest value in the code's presumptive table (clay and silt). Notice what the table does not ask: the post. A footing is sized for the weight on it, so a 4x4 and a 6x6 carrying the same deck get the same footing. The depth is a different question: the code wants every deck footing at least 12 in below undisturbed ground, and when the deck is attached to the house, below the frost line your jurisdiction publishes. That depth is set locally and varies a great deal across the country, which is why this page sends you to your building department rather than guessing. For the concrete, the result links to our concrete calculator with your footings filled in.

In snow country, the deck is designed for the snow

IRC R507.1 sizes a deck for the greater of a 40 psf crowd or the ground snow load where you live, and the tables run to 70 psf. At 70 psf the 12 x 16 example needs 2x10 joists, because a Southern pine 2x8 now spans only 9 ft 10 in, and its two-ply 2x10 beam may span only 7 ft 7 in, so it takes 4 posts instead of 3. Above 70 psf the prescriptive tables end, and so does this page: that deck needs an engineer.

What the tables are, and what they are not

The IRC deck tables are maximums under stated conditions: No. 2 grade lumber with the wet service factor, 10 psf of dead load, deflection limited to 1/360 of the span (1/180 at a cantilever, with a 220 lb load at the tip), and a single level of deck. They are not a design. A hot tub, a roof, a second level, heavy planters or a ledger on anything but a solid band joist all put you outside them. The numbers also move between code editions. Everything here is the 2021 IRC, which matches the 2024 IRC, but a few 2018 values were longer (a Douglas fir group 2x6 at 16 in spanned 8 ft 8 in there, 8 ft 4 in in 2021), so use the edition your jurisdiction enforces. The American Wood Council's DCA 6 guide covers the same ground with drawings; its current edition follows the 2015 IRC. For the steps up to the deck, our stair calculator checks the risers against the code, and the board foot calculator prices lumber sold by volume.

Sources

Where the numbers on this page come from. We go to the body that publishes the figure, not to another calculator. See how we verify.

Frequently asked questions

How do you calculate how many deck boards you need?

Count rows first: add one gap to the deck's width in inches and divide by the board width plus one gap, then round up. A 12 ft deck with 5.5 in boards and 3/16 in gaps needs 26 rows. Each row runs the other dimension, so on a 16 ft deck one 16 ft board covers a row. Add 10% for bad boards and miscuts and round up: 29 boards.

How far can a 2x8 deck joist span?

Under the 2021 IRC (Table R507.6, 40 psf live load), a Southern pine 2x8 may span 13 ft 1 in at 12 in on center, 11 ft 10 in at 16 in and 9 ft 8 in at 24 in. The Douglas fir, hem-fir and spruce-pine-fir group reaches 12 ft 6 in, 11 ft 1 in and 9 ft 1 in, and the redwood and cedar group 11 ft 8 in, 10 ft 7 in and 8 ft 8 in. Span is measured from the face of the ledger to the face of the beam, and snow loads shorten it.

What size joists do I need for a 12x16 deck?

With the joists running 12 ft out from the house and a two-ply beam at the edge, the joists span 11 ft 7.5 in. At 16 in on center that fits a Southern pine 2x8, whose limit is 11 ft 10 in, but only by 2.5 in. Douglas fir or redwood group lumber, or a ground snow load above 40 psf, needs 2x10s or larger.

How many footings do I need for a 12x16 deck?

Three, for a 12 x 16 ft deck bolted to the house with a two-ply 2x10 Southern pine beam: the beam may span 9 ft between posts, so its 16 ft length needs posts at both ends and the middle. With a two-ply 2x8 beam it takes four. A freestanding deck needs a second beam where the ledger was, so six.

How far apart should deck joists be?

16 in on center is the usual choice. The IRC lets 5/4 wood decking span at most 16 in between joists and 2x6 wood decking 24 in (Table R507.7). Composite boards follow their label; Trex allows its 1 in boards 16 in on a home deck, 12 in on a commercial one, and less when boards run at an angle. Wider spacing needs bigger joists: the 12 x 16 example goes from 2x8s at 16 in to 2x12s at 24 in.

How many screws do I need for a deck?

Two per board at every joist, which is what the IRC asks for with wood decking. A 12 x 16 ft deck with 26 rows of boards over 13 joists takes 676 screws, about 352 per 100 sq ft, plus two more at each butt joint. Hidden clips replace most of them: one clip in every gap at every joist.

How deep do deck footings need to be?

The IRC wants every deck footing at least 12 in below undisturbed ground, and when the deck is attached to the house, below the local frost line, which your building department publishes. The footing's width comes from Table R507.3.1, based on the deck area each post carries and your soil.

How far can a deck cantilever past the beam?

No more than a quarter of the joist's back span, and often less: IRC Table R507.6 gives a limit for each joist size and back span. A Southern pine 2x8 at a 10 ft back span may overhang 2 ft 6 in. A cantilever shortens the joist span but makes the beam work harder, because the beam then carries the overhang too.

Related calculators