What this calculator does
The Raised Garden Bed Soil Calculator tells you exactly how much soil to buy to fill a rectangular raised bed. Enter the bed's length and width in feet and the soil depth in inches, and it returns the volume in cubic feet, cubic yards, and the number of bags required for your chosen bag size. This works for any rectangular raised bed, planter box, or border anywhere in the world — it is pure geometry, with no region-specific assumptions.
How to use it
Measure the inside length and width of your bed in feet. Decide how deep you want the soil — most vegetable beds use 8 to 12 inches. Pick the bag size sold by your supplier (commonly 1.5 or 2 cubic feet). The calculator converts the inch depth to feet, multiplies the three dimensions, and divides by your bag size, rounding up so you never come up short.
The formula explained
Volume in cubic feet is length × width × (depth in inches ÷ 12), because there are 12 inches in a foot. To get cubic yards, divide cubic feet by 27 (a cubic yard is 3 × 3 × 3 feet). Bags are cubic feet divided by the bag's cubic-foot rating, rounded up to the next whole bag.
$$\text{Soil} = \text{Length} \times \text{Width} \times \frac{\text{Depth}}{12}\ \text{cu ft}$$$$\text{Cu Yd} = \frac{\text{Length} \times \text{Width} \times \frac{\text{Depth}}{12}}{27}$$$$\text{Bags} = \left\lceil \frac{\text{Length} \times \text{Width} \times \frac{\text{Depth}}{12}}{\text{Bag Size}} \right\rceil$$Worked example
A 4 ft × 8 ft bed filled 12 inches deep: depth = 12 ÷ 12 = 1 ft, so volume = 4 × 8 × 1 = 32 cubic feet. That is 32 ÷ 27 ≈ 1.19 cubic yards. Using 1.5 cu ft bags, 32 ÷ 1.5 = 21.3, rounded up to 22 bags.
$$\text{Depth} = 12 \div 12 = 1\ \text{ft}$$$$\text{Volume} = 4 \times 8 \times 1 = 32\ \text{cu ft}$$$$32 \div 27 \approx 1.19\ \text{cu yd}$$$$32 \div 1.5 = 21.3 \rightarrow 22\ \text{bags}$$
FAQ
How deep should a raised bed be? 6 inches works for shallow-rooted greens; 10–12 inches is ideal for most vegetables and root crops.
Should I round bags up? Yes — the calculator rounds up so you have enough to fill the bed completely, accounting for settling.
Can I mix soil and compost? Yes. The total volume stays the same; just split the bag count between your chosen materials, for example 60% topsoil and 40% compost.