Solutions for Sustainable Living
How much soil do you need for your raised garden bed, planter box or pot?
Your ideal soil mix:
This document describes the exact math behind the calculator so the logic can be reviewed for correctness. All volumes are computed in cubic feet first, then converted to cubic yards.
The chosen style determines how the length and width inputs are interpreted. Depth is always entered in inches.
| Style | Length / Width | Depth |
|---|---|---|
| Raised Garden Bed | feet | inches |
| Pot / Elevated Planter | inches | inches |
Every dimension is first converted to feet:
depth_ft = depth_in / 12 length_ft = (style == pot) ? length_in / 12 : length_ft width_ft = (style == pot) ? width_in / 12 : width_ftFor circle, the length input is the diameter. For hexagon, the length input is the side length of a regular hexagon. Width is only used (and only required) for square and rectangle.
square / rectangle: V = length_ft × width_ft × depth_ft circle: V = π × (length_ft / 2)² × depth_ft hexagon: V = (3/2) × √3 × length_ft² × depth_ftThe hexagon area term (3/2)·√3·s² is the standard area of a regular hexagon with side s.
One cubic yard equals 27 cubic feet (3 ft × 3 ft × 3 ft):
cubic_yards = cubic_feet / 27No rounding is applied before this division — values are computed at full precision and only rounded to one decimal place for display. (An earlier version rounded cubic feet up with ceil() before dividing, which badly over-estimated small pots; that step has been removed.)
The total volume is split into a recommended planting mix. The three parts always sum to 100% of the total volume:
| Component | Share | Formula |
|---|---|---|
| Soil | 50% | total × 0.50 |
| Compost | 30% | total × 0.30 |
| Potting mix | 20% | total × 0.20 |
Each component is reported both in cubic yards (large number) and cubic feet (smaller line), derived from the same total.
Length and depth are always required and must be valid numbers. Width is required only for square and rectangle (it is hidden and ignored for circle and hexagon). If a required field is empty or non-numeric, the calculation is blocked and an inline error is shown.
Raised bed · rectangle · length 4 ft, width 3 ft, depth 12 in:
depth_ft = 12 / 12 = 1 V = 4 × 3 × 1 = 12 cubic feet cubic_yards = 12 / 27 = 0.44 ≈ 0.4 soil 50% = 6.0 cf | compost 30% = 3.6 cf | potting 20% = 2.4 cfReview of the top-10 Google results (US) for the query soil calculator, captured to guide the calculator's roadmap. Each competitor was inspected for the features it offers.
| # | Site | Standout features |
|---|---|---|
| 1 | gardeners.com | Raised-bed / pot style toggle (same as ours), 60/30/10 mix, fertilizer amounts, social share |
| 2 | inchcalculator.com | Unit switcher (in/ft/yd/cm/m), direct area input, weight in tons via density, bags needed, embeddable widget, formulas, FAQ |
| 3 | lowes.com | Bulk vs bagged mode, product picker from catalog, add-to-cart |
| 4 | soilcalculator.com | Quantity (N identical containers), bags needed across 4 bag sizes (0.75 / 1 / 1.5 / 2 cu ft) |
| 5 | omnicalculator.com | Metric + imperial, weight via density, cost estimate (price → total), bags, large FAQ |
| 6 | mahoneysgarden.com | By-the-bag / by-the-yard toggle, material selection |
| 7 | soildirect.com | Cubic yards → tons, price & delivery |
| 9 | squarefootgardening.org | Live auto-calculation, mix shown in 5-gallon buckets, charts of common bed sizes |
(#8 is a YouTube video; #10 is the inchcalculator app on Google Play.)
Common to most competitors, currently missing here:
HowTo / FAQPage) — top results carry rich copy; the biggest ranking gap for us.