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 shape formulas (rectangle, hexagon, octagon, L and U) follow the approach published in the Eartheasy guide How to Calculate Soil Volume for Raised Garden Beds, and the worked examples in that guide reproduce 1:1 in this calculator.
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 hexagon and octagon, the length input is the side length of the regular polygon. For L-shape and U-shape, the bed is treated as a sum of rectangles — two for L, three for U — and each rectangle is entered separately. Width is required for square, rectangle, L-shape and U-shape (Section 1 width in L/U).
square / rectangle: V = length_ft × width_ft × depth_ft hexagon: V = (3/2) × √3 × length_ft² × depth_ft octagon: V = 2 × (1 + √2) × length_ft² × depth_ft L-shape: V = (L1 × W1 + L2 × W2) × depth_ft U-shape: V = (L1 × W1 + L2 × W2 + L3 × W3) × depth_ftThe hexagon area term (3/2)·√3·s² and the octagon area term 2·(1+√2)·s² are the standard areas of regular polygons with side s. The L / U formulas match the standard approach used in published gardening guides — measure each rectangular section, add the areas, multiply by depth. All sections share the same depth.
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 for square, rectangle, L-shape and U-shape (it is hidden and ignored for hexagon and octagon). For L-shape, Section 2 length and width are also required. For U-shape, Section 2 and Section 3 dimensions are required as well. If any 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.Candidate calculators to build next, validated with Ahrefs. Figures are the estimated US monthly organic traffic of the top-ranking pages for each keyword (i.e. the current SERP leaders, not weak sites). Decision rule: build it if the leading pages clearly exceed 100 clicks/month.
| Calculator | Top page (traffic/mo) | #2 / #3 | Verdict |
|---|---|---|---|
| Gravel | calculator.net — 27,598 | 8,121 / 7,904 | ✅ Build (huge) |
| Mulch | landscapecalculator.com — 22,883 | 4,766 / 2,493 | ✅ Build (huge) |
| Grass seed | lowes.com — 3,280 | 506 / 149 | ✅ Build |
| Plant spacing | classygroundcovers.com — 2,898 | 1,419 / 177 | ✅ Build |
| Compost | mcgillcompost.com — 1,776 | 644 / 84 | ✅ Build |
| Fertilizer | agebb.missouri.edu — 1,239 | 772 / 407 | ✅ Build |
Traffic is each ranking page's total organic traffic (Ahrefs SERP overview, US, monthly). For dedicated single-purpose calculator pages this closely tracks the calculator keyword itself.
Ranked by traffic × Eartheasy brand fit × reuse of this calculator's code:
Shipping 2–3 same-formula calculators (soil → mulch → compost) cross-linked in one shared design forms an SEO cluster that outperforms any single standalone calculator and lifts the whole set.