The formula
volume (cu ft) = length (ft) × width (ft) × depth (in) ÷ 12
cubic yards = cubic feet ÷ 27
bags = cubic feet ÷ bag size (cu ft), rounded up
The conversions come from standard unit relationships: one cubic yard equals 27 cubic feet, and one cubic foot equals 1,728 cubic inches, or about 7.48 US gallons. Depth is entered in inches because that is how most fill-depth advice is written, so it is divided by 12 to convert to feet. If length and width are measured in inches, the calculator divides each by 12 as well.
Worked example: an 8 ft × 4 ft bed filled 12 inches deep holds 8 × 4 × 1 = 32 cubic feet, which is 32 ÷ 27 ≈ 1.19 cubic yards, or 16 bags of 2 cubic feet.
- Length (feet)
- Width: 4 feet lets the center be reached from both sides
- Depth: at least 12 inches recommended
- Volume = L × W × D
How deep and how wide
The University of Delaware Cooperative Extension recommends beds 4 feet wide, so the center can be reached from either side, and 4 or 8 feet long, with a depth of at least 1 foot to hold enough soil for a productive garden. Taller beds suit gardeners who have trouble bending or who garden from a wheelchair. UF/IFAS describes the standard square-foot-gardening bed as a 4 × 4 ft planting area, which is 16 cubic feet at 12 inches deep.
What to fill it with
| Option | Mix | Source |
|---|---|---|
| Topsoil–compost blend | "Good quality topsoil and compost blend", or a bagged raised-bed mix | University of Delaware |
| Equal parts | Topsoil, organic matter (well-rotted manure, compost or peat) and coarse sand | Iowa State University Extension |
| Simple ratio | About 70% topsoil and 30% compost | Iowa State University Extension |
| Square-foot style | Blended compost, or equal parts coarse vermiculite, peat moss and blended compost | UF/IFAS Gardening Solutions |
To split a total volume into parts, multiply: for a 32 cu ft bed at 70/30, that is about 22.4 cu ft of topsoil and 9.6 cu ft of compost.
Bags versus bulk
UW–Madison Extension notes that bagged potting mixes are commonly sold in 1, 2 and 2.8 cubic foot sizes (7.5, 15 and 21 gallons), which is why those sizes are preset here. Check the label: some products list volume in quarts or liters instead. Bulk soil and compost are usually sold by the cubic yard, so the yard figure is the one to give a supplier.
Before building on paving or questionable ground, Delaware recommends testing the soil and using a barrier fabric (geotextile) over suspected contamination. Its material advice: cedar, cypress, recycled lumber, blocks or bricks; new pressure-treated wood is described as safe but not for organic gardening; and recycled tires or lumber treated with creosote or pentachlorophenol should not be used.
Sources
- LibreTexts Mathematics — Converting Units of Volume
- University of Wisconsin–Madison Extension — Growing Vegetables in Containers
- University of Delaware Cooperative Extension — Raised Bed Gardening (PDF)
- Iowa State University Extension Yard and Garden — What would be a good soil mix for a raised bed?
- UF/IFAS Gardening Solutions — Square Foot Gardening
All sources were opened and checked in October 2026. Rules and figures change; confirm with the original before acting.