This calculator works out how much soil, compost, or mulch you need to fill a garden bed or cover a given area. You enter the length and width of the space in feet, plus the depth you want to fill or cover in inches, and it returns the volume in cubic yards and cubic feet. The result tells you exactly how much material to order or mix, so you don’t end up with surplus bags or a half-empty bed.
Formula
The calculator uses the standard volume formula for a rectangular prism: Volume = length × width × depth. In symbols, that is V = l × w × d, where:
- l = length of the garden bed or area, in feet (ft)
- w = width of the garden bed or area, in feet (ft)
- d = depth of soil, compost, or mulch, in inches (in)
Because the depth is in inches and the length/width are in feet, the formula first converts depth to feet by dividing by 12. That gives cubic feet directly: V (ft³) = l × w × (d / 12). To convert cubic feet to cubic yards, divide by 27 (since 1 yard = 3 feet, and 3³ = 27). Combining both steps gives the constant 324 (12 × 27), which is why the calculator’s first output uses l × w × d / 324.
Worked Example
Using the default values from the calculator above — a bed that is 40 ft long, 25 ft wide, and you want a 3-inch depth — the calculation goes like this:
- Convert depth to feet: 3 in ÷ 12 = 0.25 ft.
- Calculate cubic feet: 40 ft × 25 ft × 0.25 ft = 250 ft³.
- Convert to cubic yards: 250 ft³ ÷ 27 = 9.259 yd³.
The calculator rounds the cubic yards to two decimals, so it shows 9.26 yd³. The cubic feet output shows 250.0 ft³. That is the exact volume you need to fill a 40×25 ft area to a depth of 3 inches.
When to Use This Calculator
This tool is for any project that involves filling a defined rectangular space with a bulk material. Common uses include:
- Filling a new raised garden bed with soil mix.
- Adding a layer of compost to an existing vegetable plot.
- Spreading mulch around trees, shrubs, or flower beds.
- Leveling a lawn area with topsoil before seeding or laying sod.
- Estimating how much gravel or sand you need for a path or patio base.
For irregularly shaped beds, break the area into rectangles, calculate each one, and add the volumes together. For circular beds, use a separate circle-area calculator, then multiply by the depth.
How to Read the Result
The first number, in cubic yards, is what you’ll use when ordering bulk material from a landscape supplier. Most bulk soil and mulch is sold by the cubic yard. The second number, in cubic feet, is useful when buying bagged products — a typical bag of garden soil or compost is 1 to 2 cubic feet, so divide the cubic feet result by the bag size to get the number of bags.
For example, with the default calculation of 250 ft³, if you buy 2 ft³ bags, you need 125 bags. That’s a lot of bags, which is why bulk delivery is usually cheaper for large areas. For a small raised bed (say 4×8 ft at 12 inches deep), the volume is 32 ft³, which would be 16 bags of 2 ft³ each — manageable but still heavy.
Common Mistakes and How to Avoid Them
The most frequent error is mixing units. If you measure length and width in feet but depth in inches, you must convert the depth to feet before multiplying. The calculator does this for you, but if you’re doing it by hand, remember: 3 inches = 0.25 ft, 6 inches = 0.5 ft, 12 inches = 1 ft.
Another mistake is forgetting that soil settles. Freshly tilled soil or compost can settle by 10–20% after watering and time. If you want the bed to end up at a certain depth after settling, add about 15% to your calculated volume. For the worked example, that would mean ordering roughly 10.6 yd³ instead of 9.26 yd³.
A third issue is over-ordering for irregular shapes. If your bed isn’t a perfect rectangle, you’ll overestimate if you use the longest length and width. Instead, measure the actual average width at several points and use that average.
Bulk vs. Bagged: What You Need to Know
Bulk soil, compost, and mulch are sold by the cubic yard. A cubic yard is 27 cubic feet, which is roughly the size of a washing machine. A standard pickup truck bed can typically hold about 1 to 2 cubic yards, depending on the truck and how high you pile it. Landscape suppliers usually deliver in dump trucks, and there is often a minimum delivery amount (commonly 1 to 3 cubic yards).
Bagged products are convenient for small projects but much more expensive per cubic foot. A 2 ft³ bag of compost might cost a few dollars, while a cubic yard of bulk compost might cost $30–$50. For any area larger than about 20 square feet at 3 inches deep (which is 5 ft³, or 3 bags), bulk is usually the better value.
When ordering bulk, ask the supplier if the volume is measured loose or compacted. Loose soil delivered in a truck will settle once spread, so you might need more than the calculated amount.
Limitations of the Formula
This calculator assumes a perfectly rectangular, flat area with uniform depth. Real garden beds often have sloped sides or uneven bottoms. If your bed is deeper at one end, measure the depth at several points and use the average. The formula also doesn’t account for the fact that soil is sold by volume, but it compacts when placed. The volume you order is the loose volume; the final settled volume will be less.
For very large areas (over 1,000 ft²), consider that the ground may not be perfectly level. A 1% slope over 40 feet means a 0.4 ft difference in height, which changes the volume you need. If you’re filling a depression or leveling a yard, use a laser level or string line to measure the actual depth needed at several points.
Finally, this calculator gives the volume of material needed, not the weight. Soil density varies widely — from about 70 lb/ft³ for dry topsoil to over 100 lb/ft³ for wet clay. If you need to know the weight for transport or structural reasons, multiply the cubic feet by the expected density. For reference, a cubic yard of dry topsoil weighs roughly 2,000 lb, but always confirm with your supplier.
Frequently Asked Questions
How many cubic feet are in a cubic yard?
There are 27 cubic feet in one cubic yard. This is because a yard is 3 feet long, so a cubic yard is 3 ft × 3 ft × 3 ft = 27 ft³. This is the key conversion for switching between bagged and bulk purchases.
What depth of soil do I need for a raised garden bed?
For most vegetables, a depth of 12 inches is recommended. Root crops like carrots and potatoes need at least 12 inches, while shallow-rooted greens like lettuce can do with 6 inches. If your bed sits on grass or hard ground, go deeper to give roots room to grow. Use the calculator with your bed’s length and width and set the depth to 12.
How much compost should I add to my existing garden?
A common guideline is to add a 1–3 inch layer of compost to the top of your garden each year. For a 100 ft² bed, a 2-inch layer equals 100 × (2/12) = 16.7 ft³, or about 0.62 yd³. Work it into the top 6–8 inches of soil. This calculator is perfect for figuring out how much to order.
Should I order more soil than the calculator says?
Yes, it’s wise to order 10–15% extra. Soil settles and compacts, and you may need a bit more to reach the desired level after watering. For a raised bed, you also lose some volume to the corners and any settling of the bed frame. Just remember: you can always use extra soil elsewhere in the yard, but running short means a second delivery or a trip to the store.
Can I use this calculator for mulch or gravel?
Yes, the formula works for any bulk material that you spread to a uniform depth. Mulch, gravel, sand, and even wood chips are all measured by volume. The only difference is the weight per cubic foot, which doesn’t affect the volume calculation. For mulch, a 2–3 inch layer is typical; for gravel paths, 2–4 inches is common.
What if my garden bed is not a rectangle?
Break the bed into smaller rectangles, calculate each one separately, and add the volumes together. For a triangular section, multiply the base by the height and divide by 2 to get the area, then multiply by the depth. For curved or irregular shapes, use a garden hose or string to outline the shape, then measure the average width at several points. The more rectangles you use, the more accurate your estimate.
Related
Formula used
in l | Lawn length | ft | 40 | 0 | 100000 in w | Lawn width | ft | 25 | 0 | 100000 in d | Depth | in | 3 | 0 | 120 out yd | Volume | yd³ | l * w * d / 324 | 2 out ft3 | Volume | ft³ | l * w * d / 12 | 1
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More in this bed
- Planting Calculator: When to Start Your Garden
- Potting Mix Volume: How Much Does a Garden Pot Hold?
- Spacing Collards in a Square Foot Garden16 plants
- Compost Heap for Waste Fertilizer: How to Convert0.050 lb/ft³
- Ratio Fertilizer for Rosewood Trees: Feeding Guide9.26 yd³
- Lime per Acre: How Much to Apply0.50 tons/acre