The frame is up, the boards are level, and the bed is standing there empty — which is the easy part. The part nobody warns you about is the soil, because a 4-by-8 bed a foot deep swallows a full cubic yard before you have even started on the second one, and guessing wrong means either a second trip to the supplier or a pile of extra dirt with nowhere to go.
This calculator tells you how much soil your raised bed needs — in cubic feet and cubic yards — and splits it into the mix you pick, so you can order bulk by the yard or count bags at the store.
How much soil does your raised bed need?
Measure the inside of the frame, not the outside — the boards eat an inch or two, and the soil only fills what is inside them.
Four feet wide is the usual width, because you can reach the middle from either side without stepping in.
12 inches is the depth to aim for — deep enough for most vegetables, and the depth the examples below use.
Roots grow down into soil below the bed, so a bed on soil can be shallower than one on concrete.
The calculator starts with the simplest one — mostly topsoil with compost mixed in. The table below works through what each mix is for.
Only if you have several beds the same size — the calculator adds them up for you.
Type the size printed on the bag you are buying. Leave it blank for a cubic-yard answer only.
Tick this if you are refreshing last year’s soil — the math is the same, and the depth warning goes away.
Without JavaScript, the tables and worked examples below give the same answers by hand.
What to type in
Start with the length and width, measured inside the frame, and the depth is the number that decides the order. Twelve inches is the depth to type in unless you have a reason not to, because on soil, 6 to 12 inches gives most vegetables room to grow, while on a hard surface the bed needs more — 8 inches at least for leafy greens, beans, and cucumbers, and 12 to 24 inches for peppers, tomatoes, and squash, since the roots have nowhere else to go.
The mix is your choice, and the calculator starts with the simplest one: about 70% topsoil and 30% compost. If you have several beds the same size, type the number and the calculator adds them up, but beds of different sizes need separate runs — the math is the same each time. Bag size is whatever the bag you are buying says, and if you leave it blank, the calculator gives you cubic yards only.
What the answer means
The calculator gives you three numbers, and each one answers a different question at the store. Cubic feet is the raw volume — the amount of soil itself. Cubic yards is the same volume in the unit bulk suppliers sell by, so it is the number to quote when you order a truckload. The bag count is the number of bags to put in the cart, rounded up, because you cannot buy part of a bag.
The mix split is the order broken down by ingredient — how much topsoil and how much compost to ask for — and the organic-matter line tells you the share of compost or organic matter in the mix you picked. Every mix in the calculator lands between a quarter and a half of the volume, which is the range garden soil is supposed to sit in.
How deep should the soil go?
On soil, 6 to 12 inches is the depth to aim for. That gives roots room to grow down into the ground below the bed, which is doing half the work — the bed is only the top of the root zone, not the whole of it. Beds can go higher for easier access, but every extra inch is more soil to buy.
On a hard surface the bed is the whole root zone, so it has to be deeper. Leafy greens, beans, and cucumbers need at least 8 inches, while peppers, tomatoes, and squash need 12 to 24. Those beds also dry out faster, because the surface underneath absorbs and reflects heat, so plan on watering more often. If tomatoes are the plan, our cherry and paste tomato guide covers support, water, and harvest once the bed is filled, and leafy greens and herbs do fine in the shallower beds — our Mediterranean herbs guide covers sun, soil, and watering.
Which mix should you pick?
Start with the default — about 70% topsoil and 30% compost — unless your ground gives you a reason not to. It is the simplest bulk order, and the compost is doing the work of feeding the soil while the topsoil gives it body.
The equal-thirds mix adds coarse sand to the topsoil and organic matter, which keeps the mix light and well-drained. The two compost-heavy mixes are the ones built for ground that is compacted and heavy with clay: one part compost to two parts topsoil, or half and half if the clay is bad, because the compost loosens the clay and the topsoil gives the roots something to grow in. Pick the mix that fits your ground, and let the calculator do the arithmetic.
How the math works
The calculator multiplies your bed’s length by its width, turns your depth from inches into feet, and multiplies again — that gives the volume in cubic feet. Then it divides by 27 for cubic yards, since one cubic yard holds 27 cubic feet, and divides by your bag size for the bag count, rounding up.
The inches-to-feet step is the only fiddly part. A depth of 12 inches is 1 foot, 10 inches is 0.83 feet, 8 inches is 0.67 feet, and 6 inches is half a foot — the worked examples below show the step in full. For a round bed, measure from the center to the edge, then multiply 3.14 by that number times itself, which gives the area in square feet; multiply that by the depth in feet, and you have the volume.
Worked examples
A 4-by-8-foot bed, 12 inches deep, filled with the 70% topsoil / 30% compost mix: 4 times 8 times 1 foot is 32 cubic feet. Divide by 27 and that is 1.19 cubic yards. The split is 22.4 cubic feet of topsoil (0.83 cubic yards) and 9.6 cubic feet of compost (0.36 cubic yards).
A 4-by-4-foot bed, 10 inches deep: 4 times 4 times 10 twelfths of a foot is 13.33 cubic feet, or 0.49 cubic yards.
Two beds, a 4-by-8 and a 4-by-4, both 12 inches deep, filled with the 1-to-1 mix: the first takes 32 cubic feet and the second takes 16, for 48 cubic feet in all — 1.78 cubic yards. Half and half means 24 cubic feet of compost and 24 of topsoil.
How much soil for common bed sizes
Find your bed’s size and your depth, and read across for the volume and the cubic yards.
| Bed size | Depth | Cubic feet | Cubic yards |
|---|---|---|---|
| 4 × 4 ft | 6 in | 8.00 | 0.30 |
| 4 × 4 ft | 8 in | 10.67 | 0.40 |
| 4 × 4 ft | 10 in | 13.33 | 0.49 |
| 4 × 4 ft | 12 in | 16.00 | 0.59 |
| 4 × 8 ft | 6 in | 16.00 | 0.59 |
| 4 × 8 ft | 8 in | 21.33 | 0.79 |
| 4 × 8 ft | 10 in | 26.67 | 0.99 |
| 4 × 8 ft | 12 in | 32.00 | 1.19 |
| 4 × 12 ft | 6 in | 24.00 | 0.89 |
| 4 × 12 ft | 8 in | 32.00 | 1.19 |
| 4 × 12 ft | 10 in | 40.00 | 1.48 |
| 4 × 12 ft | 12 in | 48.00 | 1.78 |
The four mixes, side by side
Every mix here lands inside the 25-to-50% organic-matter range, so the choice is about what your ground needs. The table shows the share of each ingredient in the mix you pick.
| Mix | Topsoil | Compost or organic matter | Coarse sand | Organic-matter share |
|---|---|---|---|---|
| ~70% topsoil / ~30% compost (Iowa State) | 70% | 30% | None | 30% |
| Equal thirds (Iowa State) | 33% | 33% | 33% | 33% |
| 1:2 compost to topsoil (Univ. of Maryland) | 67% | 33% | None | 33% |
| 1:1 compost to topsoil (Univ. of Maryland) | 50% | 50% | None | 50% |
Filling the bed
Loosen the ground before the mix goes in. Pull up the sod, work the soil underneath with a spade or a rototiller, then add a few inches of mix and work it into the ground below. Do not build distinct layers — a sharp line between the mix and the soil underneath slows water down and discourages roots from crossing it. Till 6 to 8 inches deep and blend about 2 inches of mix into the native soil before you fill the rest.
Buy topsoil from a dealer you trust, and look at it before it is delivered — it should be dark and crumbly with an earthy smell. Make sure the compost is mature, well-rotted, and not carrying too much salt. And count bags of mix, not bags of topsoil: bags marked “organic soil” usually hold wood waste, bark fines, compost, and peat, not mineral topsoil.
Plan to top up an inch or two every year, because the organic parts keep breaking down and the bed settles. That settling is expected — the bed shrinks a little as the organic parts break down. Once the bed is filled and planted, mulch around the plants to hold moisture in — our mulch volume calculator works out how much you need.
What this calculator won’t tell you
This tells you how much soil fills the bed you measured — not how often to water, and it does not know your weather, your soil, or whether the ground underneath is clay or sand, so test your soil before you plant. It adds nothing for settling, because the mix shrinks as the organic parts break down and no honest number exists for how much — top up an inch or two each year instead. Measure the bed, pick the mix, and order what the calculator says — that is the whole job.
Sources
Iowa State University Extension and Outreach, “What would be a good soil mix for a raised bed?” — https://yardandgarden.extension.iastate.edu/faq/what-would-be-good-soil-mix-raised-bed — fetched November 7, 2026; re-checked November 14, 2026. Governs the two mix options, the mature-compost and clean-topsoil cautions, and the no-layers method.
University of Maryland Extension, “Soil to Fill Raised Beds” — https://extension.umd.edu/resource/soil-fill-raised-beds — fetched November 7, 2026; re-checked November 14, 2026. Governs the 25–50% organic-matter range, the 1:2 and 1:1 ratios, the hard-surface minimum depths, and the bagged-soil caution.
Alabama Cooperative Extension System, “Raised Bed Gardening” (ANR-1345) — https://www.aces.edu/blog/topics/lawn-garden/raised-bed-gardening/?cn-reloaded=1 — fetched November 7, 2026; re-checked November 14, 2026. Governs the 6–12-inch depth, the 27-cubic-feet-per-cubic-yard conversion, the worked bed volumes, the till-and-blend method, and the 1–2-inch annual top-up.



