How to use the deck calculator
This deck calculator turns the size of a deck into a shopping list. It counts deck boards row by row, the way they are laid, with every joint on a joist; it counts joists, rims, beams and posts from the spacing you choose; it works out the concrete for the footings and the balusters for the railing. All of the math runs in your browser.
- Choose the shape. Under Shape, pick Rectangle, L-shape (a rectangle with one outer corner missing) or Sections (several separate rectangles, such as a deck and a landing). Say whether the deck is attached to the house or freestanding, and how high it is.
- Describe the decking. Choose the board material, the board width and gap, the board length you can buy, straight or diagonal boards, and an optional picture-frame border.
- Enter the framing from your plan. Set the joist spacing, how many beams there are and how far apart the posts go. The calculator counts the members; it does not size them.
- Add footings, fasteners and railing. Enter the footing size and depth, the yield printed on your concrete bags, the fastening method, and the railing post spacing and baluster size.
- Read the materials list. Add prices if you want a cost. Copy the results, download them as a CSV file or print them.
Every length field has its own unit, and you can type 12' 6", 150 in or 3.6 m. Switch Units to Metric to see areas in square meters and board lengths in meters. The calculator remembers your last entries on this device.
How to measure for a deck
- Width along the house. The side the deck boards run along. On an attached deck it is the length of the ledger, the board fastened to the house.
- Depth. How far the deck reaches out from the house. Joists run this way, from the ledger to the rim joist at the front.
- L-shaped decks. Enter the overall width and depth, then the width and depth of the missing corner. For any other shape, split the deck into rectangles and use Sections, or work out the area first with the square footage calculator.
- Height. Measure from the top of the decking down to the ground at the highest point near an open edge. It decides whether the deck needs a guard and how tall the stairs are.
Measure to the outside of the framing, and round up to the next inch or centimeter. Board overhang at the edges is trimmed off, so it does not change the count.
How to calculate deck materials
The calculator follows the order a deck is built in, from the decking down to the footings:
rows of boards = (deck depth + gap) ÷ (board width + gap), rounded up
boards to buy = pieces packed into stock lengths × (1 + waste ÷ 100), rounded up
joists = width ÷ joist spacing, rounded up, + 1
posts per beam = beam length ÷ post spacing, rounded up, + 1
balusters = (clear span − gap) ÷ (baluster width + gap), rounded up
- Measure the deck. Measure the width along the house and the depth out from it. Split an odd shape into rectangles.
- Count the rows of boards. Add the gap to the depth and divide by the board width plus the gap, then round up. The last board may need to be ripped narrower.
- Choose the board length. Cut each row into pieces whose joints land on joists, fit the pieces into the board lengths you can buy, and add a few percent for waste.
- Count the joists. Divide the width by the joist spacing, round up and add one, so there is a joist at each end. Add the rim joist and, for an attached deck, the ledger.
- Count the posts and footings. For each beam, divide its length by the post spacing from your plan, round up and add one. Each post sits on a footing.
- Add the railing. Measure the open sides, leave out the stair openings, place the railing posts and fit balusters so that no gap reaches 4 inches.
Example: a deck 16 ft wide along the house and 12 ft deep, attached, with 5 1/2 in boards, 1/8 in gaps and joists 16 in on center. The depth of 144 in plus one gap, divided by 5 5/8 in per row, rounds up to 26 rows. Each row is one 16 ft board, so the deck takes 26 boards, or 28 boards with 5% for waste. A board on joists 16 in apart crosses 13 of them, so the frame has 13 joists 12 ft long, a 16 ft rim joist and a 16 ft ledger with 13 joist hangers. One doubled beam with posts no more than 6 ft apart needs 4 posts and footings.
Deck boards: widths, gaps and lengths
Lumber is sold by its nominal size, which is larger than the board. The American Softwood Lumber Standard, PS 20, lists a board 6 in nominal width at 5 1/2 in when dry, a nominal 1 1/4 in (5/4) thickness at 1 in and a nominal 2 in thickness at 1 1/2 in. So a 5/4 × 6 or a 2 × 6 deck board covers 5 1/2 in, which is the calculator's default. Composite and PVC boards are not lumber: use the width on their label.
The gap between boards lets water drain and leaves room for the boards to move. The American Wood Council deck guide says to "Space decking boards approximately 1/8" apart." Wet treated lumber shrinks as it dries, and composite boards can expand and contract with temperature, so follow the instructions for your decking. Each row then takes the board width plus one gap: 5 5/8 in with the defaults.
Boards are cut so that every joint lands on a joist, and the same guide adds: "Each segment of decking must bear on a minimum of 3 joists (or 3 supports)." When a row is longer than one board, the calculator cuts full pieces that end on a joist and moves the last joint back if the end piece would be too short. All of the pieces are then packed into the board length you choose, so an offcut from one row can finish another. Auto tries every length the yard commonly stocks and keeps the one that buys the least decking.
That is why the board length matters. A deck 20 ft wide built with 16 ft boards needs 52 pieces and 33 boards before waste, while 20 ft boards cover it with 26, one per row and no joints.
| Deck (width × depth) | Area (sq ft) | Rows | Board length (ft) | Boards | Joists |
|---|---|---|---|---|---|
| 10 × 10 ft | 100 | 22 | 10 | 24 | 9 |
| 12 × 12 ft | 144 | 26 | 12 | 28 | 10 |
| 16 × 12 ft | 192 | 26 | 16 | 28 | 13 |
| 20 × 12 ft | 240 | 26 | 20 | 28 | 16 |
| 16 × 16 ft | 256 | 35 | 16 | 37 | 13 |
| 24 × 16 ft | 384 | 35 | 12 | 74 | 19 |
The quick method most estimates use divides the deck area by the area one board covers. For the example deck that is 192 sq ft ÷ (16 ft × 5 5/8 in), or 27 boards with the same 5% waste. It ignores the last, ripped board and the lengths you can buy, which is why the calculator counts rows and shows the area method only for comparison.
Diagonal decking and picture-frame borders
Boards laid at 45° change the look of a deck, but they use more decking: every row is clipped to the outline, and each end is cut at an angle. The calculator lays the rows across the deck at 45°, measures every piece on its long edge, and cuts pieces so their joints land on joists, which a diagonal board crosses every joist spacing × √2.
For the example 16 × 12 ft deck with joists 12 in apart, a diagonal layout has 43 rows and 52 pieces, 428.9 ft of board in all, that pack into 28 boards 16 ft long before waste, against 26 for straight boards. The calculator works this out instead of adding a fixed percentage, so keep the waste allowance for bad boards and mistakes.
Diagonal boards also span farther between joists, so the joists usually have to be closer together. Table R507.7 of the 2024 International Residential Code (IRC) allows 1 1/4-inch-thick wood decking on joists up to 16 in on center when the boards run perpendicular to the joists, but 12 in when they run diagonally, for boards on three or more joists; 2-inch-thick wood decking may go on joists up to 24 in apart either way. For composite and PVC boards, section R507.2.2.1 requires a label with "the allowable load and maximum allowable span". The calculator warns you when your spacing goes past the table for wood decking. Local codes and amendments govern; check with your building department.
A picture-frame border is a course of boards around the edge, mitered at the corners, that hides the cut ends of the field boards. Choose 1, 2 or 3 boards, on 3 sides (leaving the house side open) or on all 4. With one border board on 3 sides, the example deck has 3 border pieces and 25 rows inside it, for 28 boards before waste. The border boards along the sides run parallel to the joists, so they need blocking or doubled joists under them; plan that with your framing.
Deck screws and hidden fasteners
Every place a board crosses a joist needs fastening. Section R507.7 of the 2024 IRC says "Wood decking shall be attached to each supporting member with not less than two 8d deformed shank nails or two No. 8 wood screws." Other decking and fastener systems go in according to the maker's instructions. So the calculator counts the crossings (board pieces over joists, plus both board ends at every joint) and multiplies by the fasteners per crossing: 2 for face screws or nails, 1 for hidden clips, or the number in your clip instructions.
The example deck has 338 crossings, so it takes about 676 face screws. With hidden clips at one per crossing it is 338 clips. Enter how many come in a box to see the boxes: at 350 screws a box, that is 2 boxes. Buy a few extra for the ones you drop.
Joists, rim joists, beams and posts
The calculator counts framing members from the spacing you enter. It does not say how big they must be or how far they may span. In the 2024 IRC, post sizes are in Table R507.4, beam spans in Tables R507.5(1) through R507.5(4), and joist spans in Table R507.6, and section R507.6 adds: "The maximum joist spacing shall be limited by the decking materials in accordance with Table R507.7." Those tables depend on the species and grade of the lumber, the snow load and any cantilever, so take the sizes from your plan, the code or the American Wood Council guide, and ask your building department or an engineer.
- Joists run from the house to the front, one at each end and the rest at the spacing: width ÷ spacing, rounded up, plus one.
- Rim (band) joists close the ends of the joists: one across the front of an attached deck, front and back on a freestanding one.
- The ledger is the board fastened to the house. Section R507.6.1 says "Joist framing into the side of a beam or ledger board shall be supported by approved joist hangers." So an attached deck gets one hanger per joist.
- Beams carry the joists. Enter how many lines of beam there are and how many boards make each one; each beam is as long as the deck is wide.
- Posts hold up the beams, one at each end of every beam and the rest at your spacing: beam length ÷ spacing, rounded up, plus one.
An L-shaped deck is framed as two rectangles, so where they meet the count has two joists side by side. Closer joists add up: the example deck on joists 12 in apart has 17 joists, and on joists 24 in apart, with 2-inch-thick decking, 9. Freestanding, with a beam at each end, it needs 8 posts.
Deck footings and concrete
Each post stands on a footing. Section R507.3 says decks "shall be supported on concrete footings or other approved structural systems designed to accommodate all loads", and section R507.3.1 sets the minimum size in Table R507.3.1, "based on the tributary area and allowable soil-bearing pressure". The calculator does not choose the size: enter the diameter or width and the depth from your plan.
Depth matters too. Under section R507.3.2, "Deck footings shall be placed not less than 12 inches (305 mm) below the undisturbed ground surface," and under section R507.3.3, footings of a deck attached to a frost-protected house must be protected from frost, for example by "Extending below the frost line specified in Table R301.2." Your building department knows the local frost depth.
A round footing holds π × radius² × depth of concrete, a square one width² × depth. A 12 in round footing 36 in deep holds 2.36 cu ft. If your bags say they make 0.60 cu ft each, that is 3.9 bags, so 4 per footing. The example's 4 footings hold 9.42 cu ft; with 10% extra for uneven holes, 10.37 cu ft, or 0.38 cubic yards, which is 18 bags. Square footings 10 in wide and 36 in deep would take 16 bags. Read the yield printed on your bag: it is not the bag's weight, and it differs from mix to mix. For a large pour, compare the cubic yards with ready-mix delivery using the cubic yard calculator.
Section R507.4.1 also asks for lateral restraint where posts bear on footings: approved connectors, or "a minimum post embedment of 12 inches (305 mm) in surrounding soils or concrete piers."
Deck railings and baluster spacing
A railing on a raised deck is a guard, and the code sets when one is required, how tall it is and how big its openings may be. Section R321.1.1 of the 2024 IRC requires guards on open-sided walking surfaces "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." Section R321.1.2 makes required guards "not less than 36 inches (914 mm) in height". And section R321.1.3 says they "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." Deck guards must also meet section R507.10 on how they are supported by the framing.
In the calculator, On the open sides runs the railing along every side not against the house and takes the stair openings out of the front. Each side is split into equal sections no longer than your railing post spacing. Between two posts, the clear span is the section length minus one post width, and the balusters are spread so that every gap, including the ones next to the posts, is the same and no wider than the largest gap you allow. The largest gap must be under 4 in; the default is 3 1/2 in, to leave room for boards that are not perfectly straight.
On the example deck, 36 ft of railing with one 4 ft stair opening makes 6 sections of 6 ft and 8 railing posts. With 4 × 4 posts (3 1/2 in) and 1 1/2 in balusters, each section takes 13 balusters with gaps of 3 1/2 in, 78 in all, plus 72 ft of rail for a top and a bottom rail. Without the stair opening there would be 88 balusters.
Deck stairs
Use the deck height as the total rise in the stair calculator: it works out the risers, treads, total run and stringer layout, and checks them against the 2024 IRC stair rules. Then enter the stair width here as a stair opening, so the railing count leaves it out. Stairs with open sides need their own guards: under the exceptions to section R321.1.2, "Guards on the open sides of stairs shall have a height of not less than 34 inches (864 mm) measured vertically from a line connecting the nosings," and under section R321.1.3 they may not have openings that pass a sphere 4 3/8 inches (111 mm) in diameter. The stair stringers sit on their own footing or landing, which this calculator does not count.
Deck codes: the 2024 IRC and the AWC guide
Many places in the United States adopt the International Residential Code (IRC), published by the International Code Council, often with local amendments. In the 2024 edition, decks are section R507, "Exterior Decks," in Chapter 5, and guards are section R321 in Chapter 3. Chapter 3 was renumbered in 2024: the 2021 IRC numbered guards R312.1, so older guides may cite that number.
- R507.1: "Decks shall be designed for the live load required in Section R301.5 or the ground snow load indicated in Table R301.2, whichever is greater."
- R507.2 covers materials, including composite boards (labeled to ASTM D7032) and metal fasteners and connectors.
- R507.3 to R507.6 cover footings, posts, beams and joists, with the size and span tables.
- R507.7 covers decking and its fastening; R507.8 and R507.9 how a deck is attached to the house and braced against sideways loads; R507.10 guards.
The American Wood Council publishes DCA 6, the Prescriptive Residential Wood Deck Construction Guide, with drawings and tables for single-level wood decks. The edition on its site is based on the 2015 IRC, and it says "Where differences exist between provisions of this document and the IRC, provisions of the IRC shall apply." Your building department decides which code edition, local amendments and guides apply, and whether you need a permit. Local codes and amendments govern; check with your building department.
Metric decks
Switch Units to Metric to see areas in square meters, volumes in cubic meters and lumber in meters. Auto then picks among board lengths from 2.4 m to 6.0 m in 0.6 m steps; check what your supplier stocks. Type lengths in meters or centimeters, and enter the bag yield in liters if that is how the bag states it.
The conversions are exact: since 1959, an inch is exactly 2.54 centimeters and a foot exactly 0.3048 meters, as the National Institute of Standards and Technology (NIST) lists in Handbook 44, Appendix C and Special Publication 811. So a square foot is exactly 0.09290304 square meters, a cubic foot 28.316846592 liters, and a cubic yard 27 cubic feet. The example deck of 192 sq ft is 17.84 m².
How we calculate
Every figure in the tool and on this page comes from the same code, and the examples above are checked against it automatically.
- Lengths. Every measurement is converted to feet first: inches ÷ 12, centimeters ÷ 30.48, meters ÷ 0.3048, the exact NIST definitions.
- Rows. (Depth across the boards + gap) ÷ (board width + gap), rounded up. On a diagonal, the depth across the boards is measured at 45°.
- Pieces. Each row is clipped to the outline and cut into pieces that end on a joist; a piece that would bear on fewer than 3 joists gets a longer neighbor.
- Boards. Every piece is placed, longest first, into the board with the least length left that still holds it, and a new board is opened only when none does. The waste allowance multiplies the boards by (1 + waste ÷ 100), rounded up.
- Fasteners. Crossings of board pieces over joists, plus one for each joint, × the fasteners per crossing.
- Framing. Joists = width ÷ spacing, rounded up, + 1, each as long as the deck is deep. Posts = beam length ÷ post spacing, rounded up, + 1, per beam. Lumber is rounded up to the next stock length.
- Concrete. π × (diameter ÷ 2)² × depth, or width² × depth, per footing, × (1 + extra ÷ 100); bags = that ÷ the bag yield, rounded up.
- Railing. Sections = side ÷ post spacing, rounded up; balusters per section = (clear span − largest gap) ÷ (baluster width + largest gap), rounded up.
- Cost. Each quantity × your price. Nothing is filled in for you, because prices vary from place to place.
The calculator does not size or span anything, design the ledger attachment or lateral bracing, or count stair parts, stain or connectors other than joist hangers.
Your measurements stay on your device
The calculator runs entirely as JavaScript in your browser tab. Nothing you enter is uploaded: the page's Content-Security-Policy allows connections only back to this site, and the tool has no code that sends anything anywhere. It remembers your last measurements and settings in your browser's local storage, on your device only. There is no account and no cookie.
Frequently asked questions
How many deck boards do I need?
Add one gap to the deck's depth and divide by the board width plus the gap to get the rows, then fit each row into the board lengths you can buy, with joints on joists, and add a few percent for waste. The calculator does this for every row and picks the board length that wastes least if you choose Auto.
How many deck boards do I need for a 12 × 12 deck?
With 5 1/2 in boards and 1/8 in gaps, a 12 × 12 ft deck has 26 rows. Each row is one 12 ft board, so it takes 26 boards, or 28 with 5% for waste.
How many joists do I need for a 12 × 16 deck?
With the 16 ft side against the house and joists 16 in on center, 13 joists 12 ft long, one at each end and the rest 16 in apart. With the 12 ft side against the house, 10 joists 16 ft long. Their size comes from the span tables, not from this count.
How far apart should deck joists be?
It depends on the decking. Table R507.7 of the 2024 IRC allows 1 1/4-inch-thick wood decking on joists up to 16 in on center, or 12 in for diagonal boards, and 2-inch-thick wood decking on joists up to 24 in apart. Composite and PVC boards list their maximum span on the label. The joist size and span then come from the code tables and your building department.
How many screws do I need for a deck?
Two per board at every joist, which is what the 2024 IRC asks for wood decking. A 16 × 12 ft deck with 5 1/2 in boards on joists 16 in apart has 338 crossings, so about 676 screws. The calculator counts hidden clips at one per crossing; follow the clip instructions.
How deep do deck footings need to be?
Under the 2024 IRC, at least 12 inches below the undisturbed ground, and below the local frost line when the deck is attached to a house with frost-protected footings. Your building department can tell you the frost depth where you live.
How many bags of concrete do I need per footing?
Divide the footing's volume by the yield printed on the bag. A 12 in round footing 36 in deep holds 2.36 cu ft, so with bags that make 0.60 cu ft each it takes 3.9 bags: buy 4, plus some extra for uneven holes.
How far apart should deck balusters be?
Close enough that a 4 inch sphere cannot pass between them, which is the 2024 IRC rule for guards. In practice the gap is kept a little under 4 in. The calculator spreads the balusters evenly in each section so every gap is the same and no wider than the gap you allow.
How many balusters do I need?
Per section, subtract one post width from the post spacing, then divide by the baluster width plus the gap, after taking one gap off. A 6 ft section between 4 × 4 posts takes 13 balusters 1 1/2 in wide with gaps of 3 1/2 in; the example deck needs 78.
When does a deck need a railing?
Under the 2024 IRC, when the walking surface is more than 30 inches above the ground or floor below, measured anywhere within 36 inches of the open edge. The guard must then be at least 36 inches high, or 34 inches on the open side of stairs.
How much extra decking does a diagonal deck need?
It depends on the shape and the board length, so the calculator works it out. The example 16 × 12 ft deck with 16 ft boards needs 28 boards on a 45° diagonal, against 26 laid straight, before the waste allowance.
Does the calculator size joists, beams and footings?
No. It counts them from the spacing and sizes you enter. Sizes and spans depend on the lumber, the loads and the soil, and come from the span tables in section R507 of the 2024 IRC, the American Wood Council deck guide or an engineer. Check with your building department before you build.
Sources
- International Code Council: 2024 International Residential Code, Chapter 5, Floors, section R507 Exterior Decks: footings, posts, beams, joists, decking (Table R507.7) and guards.
- International Code Council: 2024 International Residential Code, Chapter 3, Building Planning, section R321 Guards: where required, height and the 4-inch sphere.
- American Wood Council: DCA 6, Prescriptive Residential Wood Deck Construction Guide, based on the 2015 IRC: decking gaps, fastening and the three-joist rule.
- NIST: Voluntary Product Standard PS 20-20, American Softwood Lumber Standard, Table 3: nominal and dressed sizes of boards and dimension lumber.
- National Institute of Standards and Technology: NIST Handbook 44 (2026), Appendix C, General Tables of Units of Measurement: 1 foot = 0.3048 meter and 1 inch = 2.54 centimeters, exactly.
- NIST Special Publication 811, Appendix B.9, Factors for units listed by kind of quantity: exact factors for the foot and the inch.
This is an educational tool, not engineering, building-code or construction advice. It counts materials; it does not design a deck. Joist, beam, post and footing sizes, spans and connections come from your plan, the code that applies where you live and your building department.