Raised bed soil calculator: how much soil, in cubic feet, cubic yards and bags
Multiply the inside length by the inside width (in feet) and the soil depth (in inches divided by 12) to get cubic feet, then divide by 27 for cubic yards. A 4 x 8 ft bed filled 11 inches deep holds 29.3 cu ft; with the default 15 % settling allowance that is 33.7 cu ft, about 1.25 cu yd or 17 bags of 2 cu ft.

Key points
- Volume = length x width x depth for a rectangle; an L-shape is the sum of two rectangles; a round bed is π x radius² x depth.
- 1 cubic yard = 27 cubic feet and 1 cubic foot = 28.3 litres (NIST conversion factors).
- The settling allowance is an adjustable setting (default 15 %): extension services confirm that raised bed soil settles but publish no single percentage.
- Bag counts are rounded up to whole bags, so always use the volume printed on your own bag.
- The mix split divides the volume to order between topsoil and compost (default 60/40); University of Maryland Extension suggests compost to topsoil at 1:2 or 1:1.
What the soil calculator computes
The raised bed soil calculator turns the inside dimensions of a bed and the depth of soil you want into a volume to order, expressed in cubic feet, cubic yards, cubic metres and litres. It then adds a settling allowance, counts how many bags of a given size that volume represents, and splits the total between two ingredients, such as topsoil and compost.
It handles three shapes:
- Rectangle: the usual 4 x 8 ft or 3 x 6 ft board bed.
- L-shape: any bed you can split into two non-overlapping rectangles.
- Round: a circular bed, for example one built from a cut barrel or curved edging.
The default values (8 x 4 ft, 11 inches deep, 15 % settling, 60/40 mix) describe a common bed built from two courses of 2x6 boards, which stand 2 x 5.5 = 11 inches tall. Change any field and the result updates.
The formulas
The calculator applies plain geometry, then unit conversions taken from the NIST conversion tables.
Surface area (A)
- Rectangle: A = L x W
- L-shape: A = (L1 x W1) + (L2 x W2), where the two rectangles do not overlap
- Round: A = π x r², where r = inside diameter / 2
Volume before settling (V)
- US units: V (cu ft) = A (sq ft) x depth (in) / 12
- Metric: V (m³) = A (m²) x depth (cm) / 100, and litres = m³ x 1,000
Volume to order (V_order)
- V_order = V x (1 + s / 100), where s is the settling allowance in percent
Conversions
- cubic yards = cubic feet / 27
- litres = cubic feet x 28.3168
- cubic metres = cubic feet / 35.3147
NIST gives 1 cubic yard = 0.7645549 m³ and 1 cubic foot = 0.02831685 m³; the ratio of the two is 27.0, and 0.02831685 m³ is 28.3 litres because a litre is exactly 0.001 m³. Oregon State University Extension uses the same relationship in its raised bed guide when it says a cubic yard covers 162 sq ft 2 inches deep (162 x 2 / 12 = 27 cu ft).
Bags
- bags = ceiling(V_order / bag volume), computed separately for each bag size (1, 1.5 and 2 cu ft in US units; 40, 50 and 70 L in metric)
Mix split
- ingredient A = V_order x a / (a + b), ingredient B = V_order x b / (a + b), where a and b are the shares you enter (60 and 40 by default)
Assumptions and where they come from
Each assumption below is either a measured conversion or a setting you control; the calculator does not hide any constant.
| Input or constant | Default | Basis |
|---|---|---|
| 1 cu yd = 27 cu ft | fixed | NIST SP 811 conversion factors |
| 1 cu ft = 28.3168 L | fixed | NIST SP 811 conversion factors |
| Settling allowance | 15 % | Editorial default, adjustable (see below) |
| Mix split | 60 / 40 | Adjustable; UMD Extension suggests compost:topsoil 1:2 or 1:1 |
| Bag sizes | 1, 1.5, 2 cu ft; 40, 50, 70 L | Presets only: use the volume on your label |
Settling. Illinois Extension describes settling as “simply a fact of raised bed gardening”: newly installed fill has little soil structure, and frequent disturbance makes it sink. Its advice is an annual topdressing of a few inches of compost or good topsoil, and it warns that tilling an established bed speeds up settling. We did not find an extension publication that gives a percentage, so the calculator presents settling as a user setting. The 15 % default is a planning margin, not a measured value: lower it if your mix is mostly mineral topsoil, raise it if you fill with a lot of fresh compost or other organic matter. Our guide to why raised bed soil settles covers the causes in detail.
Mix ratio. The University of Maryland Extension, for a bed built over existing soil, suggests adding compost and purchased topsoil “in a 1:2 or 1:1 ratio”, that is 33 to 50 % compost. The 60/40 default (40 % compost) sits inside that range. For a full discussion of recipes, see raised bed soil mix.
Bag volume. Growing media and soil improvers are traded by volume. The European standard EN 12580:2022 explains why (weight varies with moisture content) and notes that some products are compressible or sold in compressed bales, which is why the standard method has to account for compression. For compressed products, check whether the label gives the compressed or the expanded volume before you enter it.
Worked example
This example uses the calculator’s default values so you can check the arithmetic against the tool.
Bed: 8 x 4 ft inside, 11 inches of soil, 15 % settling, 60/40 topsoil/compost.
- Area: 8 x 4 = 32 sq ft.
- Volume: 32 x 11 / 12 = 29.33 cu ft.
- With settling: 29.33 x 1.15 = 33.73 cu ft.
- Cubic yards: 33.73 / 27 = 1.25 cu yd (0.955 m³).
- Bags: 33.73 / 1 = 33.7, so 34 bags of 1 cu ft; 33.73 / 1.5 = 22.5, so 23 bags of 1.5 cu ft; 33.73 / 2 = 16.9, so 17 bags of 2 cu ft.
- Mix: topsoil 33.73 x 0.6 = 20.24 cu ft (0.75 cu yd); compost 33.73 x 0.4 = 13.49 cu ft (0.50 cu yd).
L-shape. An 8 x 4 ft rectangle plus a 4 x 4 ft leg has A = 32 + 16 = 48 sq ft. At 11 inches with 15 % settling: 48 x 11 / 12 x 1.15 = 50.6 cu ft, or 1.87 cu yd.
Round. A bed 4 ft across has r = 2 ft and A = π x 2² = 12.57 sq ft. At 11 inches with 15 % settling: 12.57 x 11 / 12 x 1.15 = 13.25 cu ft.
If you buy the two ingredients in bags, round each ingredient up separately: 20.24 / 2 = 10.1, so 11 bags of topsoil, and 13.49 / 2 = 6.7, so 7 bags of compost. That gives 18 bags in total, one more than the 17 bags the calculator shows for the whole volume, because rounding each pile up adds a partial bag.
How to read the result
The headline figure, “volume to order”, already includes the settling allowance. If you buy in bulk, compare that line with the unit and minimum load your supplier quotes; for small quantities, the bag table shows how many bags of each preset size you would need. The mix line tells you how to divide the order between the two ingredients.
The result is a fill volume, not a weight. A cubic foot of wet, mineral-rich topsoil can weigh much more than a cubic foot of dry compost, so if you are filling a bed on a deck or balcony, the volume here is the starting point for a separate load check, not the answer to it. If you are deciding how deep to go in the first place, read how deep a raised bed should be; if you are planning to fill the bottom of a deep bed with logs and branches, the hugelkultur guide explains how that changes the soil volume you need. To size the frame itself, use the raised bed lumber calculator.
Limits
The calculator assumes a flat soil surface at a uniform depth and vertical inside walls. It does not subtract the volume of internal corner posts, mid-span braces or a layer of gravel, cardboard or wood at the bottom of the bed, and it does not model how each material compacts differently. The settling allowance is a single percentage applied to the whole volume; real settling depends on the mix, its moisture when you fill, how you water and whether you dig the bed later. Bag presets are examples: retail bag sizes vary, so type the volume shown on your own bags if it differs.
Open source code
The calculator is open source under the MIT licence. Its complete JavaScript is published on this page, below the article, so you can check every formula above against the code, copy it or adapt it for your own project, as long as you keep the licence notice.
Method and limits
Conversion factors come from NIST Special Publication 811. The statements on settling and topdressing come from University of Illinois Extension; the mix ratio range comes from University of Maryland Extension; the cubic yard coverage example comes from Oregon State University Extension; the remarks on bag volume and compressed products come from the introduction of EN 12580:2022. None of these sources gives a settling percentage, which is why that value is an adjustable default rather than a sourced constant.
Calculator source code (MIT)
// The Board Garden - raised bed soil calculator. MIT licence.
// https://theboardgarden.com/tools/raised-bed-soil-calculator/
(function () {
var root = document.querySelector('[data-tool="soil"]');
if (!root) return;
var fr = root.dataset.lang === 'fr';
var f = root.querySelector('form');
var out = root.querySelector('output');
var FT3_PER_M3 = 35.3147;
var L_PER_FT3 = 28.3168;
function num(name) {
var v = parseFloat(String(f.elements[name].value).replace(',', '.'));
return isFinite(v) && v > 0 ? v : 0;
}
function fmt(x, d) {
return x.toLocaleString(fr ? 'fr-FR' : 'en-US', { maximumFractionDigits: d === undefined ? 2 : d });
}
function update() {
var metric = f.elements.units.value === 'metric';
var shape = f.elements.shape.value;
root.querySelectorAll('[data-shape]').forEach(function (el) {
el.hidden = el.dataset.shape.split(' ').indexOf(shape) < 0;
});
root.querySelectorAll('[data-u]').forEach(function (el) {
el.textContent = metric ? el.dataset.m : el.dataset.i;
});
// lengths: imperial = feet (length/width) and inches (depth); metric = cm everywhere
var toFt = metric ? function (cm) { return cm / 30.48; } : function (ft) { return ft; };
var depthFt = metric ? num('depth') / 30.48 : num('depth') / 12;
var area = 0; // ft2
if (shape === 'rect') area = toFt(num('l1')) * toFt(num('w1'));
if (shape === 'l') area = toFt(num('l1')) * toFt(num('w1')) + toFt(num('l2')) * toFt(num('w2'));
if (shape === 'round') { var r = toFt(num('dia')) / 2; area = Math.PI * r * r; }
var settle = num('settle') / 100;
var ft3 = area * depthFt * (1 + settle);
var m3 = ft3 / FT3_PER_M3;
var litres = ft3 * L_PER_FT3;
var a = num('mixA'), b = num('mixB');
var share = a + b > 0 ? a / (a + b) : 0;
var bags = metric ? [40, 50, 70].map(function (s) { return [s + ' L', Math.ceil(litres / s)]; })
: [1, 1.5, 2].map(function (s) { return [s + ' cu ft', Math.ceil(ft3 / s)]; });
var html = '<p><strong>' + (fr ? 'Volume à commander : ' : 'Volume to order: ') + '</strong>' +
(metric ? fmt(m3) + ' m³ (' + fmt(litres, 0) + ' L)' : fmt(ft3, 1) + ' cu ft = ' + fmt(ft3 / 27) + ' cu yd (' + fmt(m3) + ' m³)') +
'</p><p>' + (fr ? 'Dont marge de tassement : ' : 'Including settling allowance: ') + fmt(settle * 100, 0) + ' %</p>' +
'<table><thead><tr><th>' + (fr ? 'Sac' : 'Bag size') + '</th><th>' + (fr ? 'Nombre de sacs' : 'Bags') + '</th></tr></thead><tbody>' +
bags.map(function (x) { return '<tr><td>' + x[0] + '</td><td>' + x[1] + '</td></tr>'; }).join('') + '</tbody></table>' +
'<p>' + (fr ? 'Mélange : ' : 'Mix split: ') + fmt(share * 100, 0) + ' % = ' +
(metric ? fmt(m3 * share) + ' m³' : fmt(ft3 * share / 27) + ' cu yd') + ', ' + fmt((1 - share) * 100, 0) + ' % = ' +
(metric ? fmt(m3 * (1 - share)) + ' m³' : fmt(ft3 * (1 - share) / 27) + ' cu yd') + '</p>';
out.innerHTML = area > 0 && depthFt > 0 ? html : (fr ? 'Saisissez les dimensions.' : 'Enter the dimensions.');
}
function defaults() {
var metric = f.elements.units.value === 'metric';
f.querySelectorAll('[data-di]').forEach(function (el) { el.value = metric ? el.dataset.dm : el.dataset.di; });
}
f.elements.units.addEventListener('change', function () { defaults(); update(); });
defaults();
f.addEventListener('input', update);
f.addEventListener('submit', function (e) { e.preventDefault(); update(); });
update();
})();
Frequently asked questions
How many cubic yards of soil do I need for a 4x8 raised bed?
A 4 x 8 ft bed has 32 sq ft of surface. At 12 inches deep it holds 32 cu ft, which is 32 / 27 = 1.19 cubic yards. At 11 inches deep (two courses of 2x6 boards) it holds 29.3 cu ft, or 1.09 cu yd. Add your settling allowance on top: with 15 % the 11-inch bed needs about 1.25 cu yd.
How many bags of soil fill a raised bed?
Divide the volume to order by the volume printed on the bag and round up. For 33.7 cu ft (a 4 x 8 ft bed, 11 inches deep, plus 15 % settling) that is 34 bags of 1 cu ft, 23 bags of 1.5 cu ft or 17 bags of 2 cu ft. Compressed bales expand when loosened, so check whether the label gives the compressed or the loose volume.
How much extra soil should I buy for settling?
No extension service we checked publishes a single settling percentage. Illinois Extension says settling is a fact of raised bed gardening and that topdressing a few inches of compost or topsoil each year should keep up with it. The calculator therefore treats settling as a setting, 15 % by default, which you can lower for a topsoil-rich mix or raise for a compost-rich one.
Should I measure the inside or the outside of the bed?
Measure the inside. Boards take up space: with 2x lumber (1.5 inches thick) a bed that measures 4 x 8 ft outside is only 3 ft 9 in x 7 ft 9 in inside, which holds about 9 % less soil at the same depth. The calculator multiplies exactly what you type, so enter inside dimensions for an accurate result.
Sources
- National Institute of Standards and Technology (2008). NIST Guide to the SI, Appendix B.9: Factors for units listed by kind of quantity or field of science (SP 811)
- Oregon State University Extension Service (2020). Raised bed gardening (FS 270)
- University of Maryland Extension (2024). Soil to Fill Raised Beds
- University of Illinois Extension (2021). Refreshing raised bed soil generates exceptional results
- CEN / iTeh Standards (2022). EN 12580:2022 Soil improvers and growing media - Determination of a quantity (preview)