DeckMath
4 styles · 5 materials · soil volume + lumber BoM · food-safe options

Planter Box Calculator

Compute lumber, soil, liner, and total cost for a deck planter box across 4 styles (raised garden bed, freestanding box, railing-mounted, trough) × 5 materials (PT pine, western cedar, redwood, composite/PVC, IPE hardwood). Inputs: outer dimensions (length × width × height in inches), style, material, optional plastic liner, optional caster wheels (freestanding only), build quantity. Outputs: soil volume (cu ft + gallons), board feet of lumber needed per box, soil bags (1.5 cu ft each), drainage hole count (½″ holes at 6″ OC bottom), total material + labor cost. 5 material profiles with documented lifespan (PT 8 yr → IPE 50 yr) and rot resistance. Auto-warns: PT requires liner if growing edibles; dimensions outside recommended style ranges; lifespan tradeoffs across material comparison panel.

4 styles · 5 materialsSoil volume + lumber BoMFood-safety warningsDrainage holesFree forever
4 styles·Garden bed → trough
$80-265/box·PT → IPE 36″ range
8-50 yr·Lifespan by material
5 materials·Ranked at same scope

Inputs

Box dimensions (outer)

in

in

in

Soil volume / box5.4 cu ft (40 gal)
Lumber / box17.5 BF
ea

Wider footprint, taller for deep-root vegetables. Often paired with deck for backyard kitchen garden.

Naturally rot-resistant. Food-safe (no chemical treatment). Premium aroma. 18-yr lifespan.

Install + region

Northeast · 1.22× labor

Raised garden bed

36×18×18″ · Western red cedar · 1× · diy

Project total
$159 $174
$174/box · 10% contingency · 18-yr lifespan
3.4 DIY hr4 bags soil · 11 drain holes

Box specs (per unit)

Soil volume
5.4 cu ft
Soil (gal)
40 gal
Lumber
17.5 BF
Drainage holes
11 ea

Cost breakdown (all boxes)

Lumber (17.5 BF × 1× × $5.8/BF)$102
Hardware (screws + brackets)$18
Liner (6-mil poly + fabric)$5
Soil (4 bags × $8.50)$34
DIY (3.4 hr)$0
Project total (high, +10%)$174

Material comparison (same scope)

PT pineCHEAPEST$221 · 8yr · medium
Western red cedarPICKED$300 · 18yr · high
California redwood$334 · 25yr · high
Composite/PVC planter board$367 · 35yr · high
IPE tropical hardwood$517 · 50yr · high

Recommendations

  • 18″ width is below Raised garden bed range (24-48″). Narrower box may not provide adequate root spread.
  • PT pine (cedar look) is cheapest at $221 (saves $79 vs current). Trade-off: 8-yr lifespan vs 18-yr.

How to use

Three steps. Permit-ready output.

  1. 01

    Enter outer dimensions

    Length × Width × Height in inches. Standard sizes: raised garden bed 36×18×18 to 72×48×24, freestanding box 16×16×16 to 24×24×18, railing-mounted 36×8×10 to 48×12×12, trough 60×12×14 to 96×16×18. Calculator computes inner dimensions (outer − 2× board thickness) for soil volume.

  2. 02

    Pick style + material

    Style drives recommended dimension ranges + use cases. Raised garden bed for deep-root vegetables. Freestanding for portable accent plants. Railing-mounted for trailing flowers (verify load capacity of railing!). Trough for screen plants. 5 materials with documented lifespan + food-safety. PT cheapest but NOT food-safe without liner. Cedar/redwood/IPE food-safe.

  3. 03

    Liner + casters

    Liner: heavy plastic + landscape fabric inside the wood box. Doubles wood lifespan by preventing constant moisture contact. ALWAYS yes if growing edibles in PT box (chemicals). $0.95/cu ft soil volume. Casters: only for freestanding boxes — heavy-duty wheels rated 100+ lb each. Soil-filled planter weight = ~80 lb/cu ft.

  4. 04

    Quantity

    Number of identical planters to build. Batch-building saves 30-40% on DIY time (cut all sides, then bottoms, then assemble in parallel). Same scope across all boxes — for different sizes, run the calc separately. Multiple of same design = one shopping trip + parallel cuts.

  5. 05

    Read soil + lumber output

    Soil volume in cu ft + gallons + bag count (1.5 cu ft per bag @ $8.50). Lumber board feet (BF = 1 sqft × 1″ thick) → cost varies $2.45/BF (PT) to $12.50/BF (IPE). Drainage holes ½″ dia at the bottom of the box, count varies with soil volume. Material comparison panel shows cheapest option at your scope.

How we calculate

The math, fully transparent.

The Planter Box Calculator computes lumber, soil, liner, and total cost for a deck planter box across 4 styles (raised garden bed, freestanding box, railing-mounted, trough) × 5 materials (PT pine, western cedar, redwood, composite/PVC, IPE hardwood). Inputs: outer dimensions (length × width × height in inches), style, material, optional plastic liner, optional caster wheels (freestanding only), build quantity. Outputs: soil volume (cu ft + gallons), board feet of lumber needed per box, soil bags (1.5 cu ft each), drainage hole count (½″ holes at 6″ OC bottom), total material + labor cost. 5 material profiles with documented lifespan (PT 8 yr → IPE 50 yr) and rot resistance. Auto-warns: PT requires liner if growing edibles (chemicals not food-safe); dimensions outside recommended style ranges; lifespan tradeoffs across material comparison panel.

IRC references

  • No IRC code applies to standalone planter boxes
  • Railing-mounted planters: verify railing system rated for soil + plant weight (typically 50-100 lb per LF added load)
  • Composite deck protection: under planter use felt pad or composite spacers to prevent staining + moisture trap
  • Food-safety: PT lumber (post-2003 ACQ formulation) safe with liner; older CCA-treated wood NEVER safe for edibles

2026-Q1 retail pricing — Home Depot / Lowe's / cedar / redwood dealer averages. PT $2.45/BF, cedar $5.80/BF, redwood $7.20/BF, composite $8.50/BF, IPE $12.50/BF. Hardware $18/box. Caster kit (4 wheels) $38. Liner $0.95/cu ft soil volume. Potting soil 1.5 cu ft per bag at $8.50.

Soil volume
soilVolumeCuFt = (length - 2 × 1″) × (width - 2 × 1″) × (height - 1″) / 1728

Inner dimensions = outer minus 2× board thickness (sides) and 1× thickness (bottom only). 1 cubic foot = 1728 cubic inches. Convert to gallons via 7.481 gal/cu ft. Example: 36×18×18 outer → inner 34×16×17 = 9248 cu in = 5.4 cu ft = 40 gallons.

Soil bags needed
soilBagsPerBox = ceil(soilVolumeCuFt / 1.5)

Standard potting soil bag = 1.5 cu ft at ~$8.50 retail. For 5.4 cu ft volume = ceil(5.4 / 1.5) = 4 bags = $34 soil cost per box. Bulk potting soil cheaper if buying 10+ bags — many garden centers do $7/bag at scale.

Lumber board feet
BF = (2 sides + 2 ends + 1 bottom) sqft × (1″ thick) / 12 × 12 = surface_sqft × thickness_in/12 × 12

Board foot = 1 sqft × 1″ thick. For 36×18×18 box: sides 2×(34+2)×18/144 = 9 sqft, ends 2×16×18/144 = 4 sqft, bottom 36×18/144 = 4.5 sqft = 17.5 sqft total × 1″ thick = ~17.5 BF lumber per box. Cedar at $5.80/BF = $101 lumber per box.

Drainage holes
holeCount = max(4, ceil(soilVolumeCuFt × 2))

½″ diameter holes at ~6″ OC on the bottom. Minimum 4 holes regardless of size. Larger box = more holes for proper drainage. Some growers add a 1″ gravel layer at bottom to keep holes from clogging with soil. Cover holes with landscape fabric squares to prevent soil washout.

Total cost
total = (lumber + hardware + liner + soil) × quantity + labor; × 1.10 contingency

Per-box material breakdown. Hardware $18 (deck screws + corner brackets) + casters $38 if included. Liner $0.95/cu ft soil volume. Soil $8.50 per 1.5 cu ft bag. Labor varies $75-145/box (pro) by material complexity. DIY hours 2-3.5 per box × material multiplier. 10% contingency on subtotal.

Save your plan

Don’t lose this estimate.

Your inputs are preserved in the URL — email it to yourself or copy the link so you can compare with contractor bids later. No account needed.

Frequently asked

Questions, answered.

Embed this calculator

One line. Any site. Free.

Drop the snippet into your contractor site, blog, or marketing page. Theme matches the parent site automatically.

<!-- Drop into any HTML, WordPress, Webflow, or contractor site -->
<script src="https://embed.deckmath.com/v1.js"
        data-deckmath-calc="planter-box-calculator"
        data-theme="auto"
        async></script>