Cubic Yard Calculator
Materials Estimator
Figure out how much mulch, soil, gravel, or concrete to order for your project — enter your dimensions and get cubic yards, bag counts, and truckloads.
Formulas: rectangular volume = length × width × depth ÷ 27. Circular volume = π × (diameter ÷ 2)² × depth ÷ 27. The +10% figure is a common allowance for settling and uneven ground — always confirm exact quantities with your supplier.

How to Use a Cubic Yard Calculator
Anyone who has ordered mulch, gravel, topsoil, sand, or concrete for a home project has run into the same confusing moment: the supplier asks how many cubic yards you need, and you’re standing there with measurements in feet, trying to do math you haven’t done since a school word problem. Order too little and you’re paying for a second delivery fee. Order too much and you’re stuck with a pile of extra material taking up space in your yard.
A cubic yard calculator solves this instantly, but knowing how to measure correctly and interpret the result matters just as much as the calculator itself. This guide covers exactly how cubic yard calculations work, how to measure your project space accurately before you even open a calculator, how to account for material-specific quirks like compaction and waste, and how to build your own simple calculator with HTML, CSS, and JavaScript if you want a tool tailored to a specific material or project type.
What You’ll Need
- A tape measure (a long one, ideally 25 feet or more, for larger areas)
- The length, width, and depth of the area you’re covering, or a rough sketch if the area is irregularly shaped
- A calculator or the cubic yard calculator tool itself
- Knowledge of what material you’re ordering (soil, mulch, gravel, sand, or concrete), since some materials need extra adjustment
- Optional: a code editor if you want to build a custom calculator for repeated use
Step 1: Understand What a Cubic Yard Actually Is
Before measuring anything, it helps to have a mental picture of the unit you’re calculating. A cubic yard is a cube measuring 3 feet by 3 feet by 3 feet — that’s 27 cubic feet of material. Picture a cube roughly the size of a large washing machine or a small refrigerator; that’s approximately one cubic yard.
This mental image matters because it helps you sanity-check a calculator’s output. If you’re covering a modest backyard flower bed and a calculator tells you that you need 40 cubic yards, something is almost certainly wrong with your measurements — that would be enough material to fill more than a dump truck bed several times over. Having a rough physical sense of the unit catches these errors before you place an expensive order.
Step 2: Measure Length and Width Accurately
Start by measuring the length and width of the area you’re covering, in feet. For a simple rectangular area like a garden bed or a driveway, this is straightforward — measure each side with a tape measure and record both numbers.
For irregular shapes, break the area into smaller rectangles or triangles that are each easy to measure individually, calculate each section separately, then add the totals together at the end. This “divide and conquer” approach is far more accurate than trying to estimate one irregular shape as a whole, and it’s the same method professional landscapers use when a yard isn’t a clean rectangle.
If you’re measuring a large area, measure at more than one point rather than assuming your yard is perfectly uniform. Property lines, garden beds, and driveways often have slight variations in width from one end to the other, and averaging a couple of measurements gives you a more accurate result than a single guess.
Step 3: Measure or Decide on Depth
Depth is where most calculation mistakes happen, mostly because depth isn’t something you’re measuring from an existing physical feature the way you are with length and width — you’re deciding it based on what the material needs to do.
Different materials and projects call for different standard depths. Mulch for garden beds typically needs 2 to 4 inches. Topsoil for a new lawn or garden often needs 4 to 6 inches of depth if you’re building up the soil significantly. Gravel for a walkway or base layer typically runs 3 to 4 inches, while a gravel driveway base often needs closer to 6 to 8 inches for structural stability. Concrete slab depth depends heavily on what’s being built — a simple walkway might only need 4 inches, while a structural driveway or foundation could require significantly more, and this is one case worth checking against local building codes or a contractor’s recommendation rather than guessing.
Whatever depth you land on, convert it to feet before calculating, since length and width are almost always measured in feet, and mixing units (inches for depth, feet for length and width) without converting is the single most common source of wildly wrong calculator results. To convert inches to feet, divide by 12 — so 4 inches becomes 0.33 feet.
Step 4: Run the Calculation
The core formula behind every cubic yard calculator is simple once you have length, width, and depth all measured in feet:
Length (ft) × Width (ft) × Depth (ft) = Cubic Feet
Then convert cubic feet to cubic yards by dividing by 27 (since, as covered in Step 1, one cubic yard equals 27 cubic feet):
Cubic Feet ÷ 27 = Cubic Yards
For example, a garden bed measuring 10 feet by 6 feet, with mulch spread 3 inches deep (0.25 feet):
10 × 6 × 0.25 = 15 cubic feet
15 ÷ 27 = 0.56 cubic yards
Most suppliers sell material in whole or half-yard increments, so you’d likely round up to a full or half yard depending on their minimum order policies, which brings us to the next step.
Step 5: Round Up, and Add a Buffer for Waste
Here’s where a purely mathematical answer needs a practical adjustment. Materials settle, spread unevenly, and get lost to spillage during delivery and spreading, so ordering the exact calculated amount often leaves you slightly short by the time the project is actually finished.
A common rule of thumb is to add 5 to 10% extra to your calculated total to account for this natural waste and settling, especially for materials like mulch and loose gravel that compress once they’re spread and walked on. For a project calculating out to exactly 2 cubic yards, ordering 2.1 to 2.2 cubic yards worth (rounded to whatever increment your supplier sells) gives you a reasonable safety margin without dramatically overordering.
For concrete specifically, this buffer matters even more, since concrete is far more expensive per yard than mulch or gravel, and running short mid-pour is a genuinely serious problem — many contractors add a 10% buffer specifically for concrete pours for this reason, and some suppliers recommend an even larger buffer for complex or irregularly shaped pours.
Step 6: Account for Compaction if the Material Will Be Compacted
Some materials, particularly gravel and certain soil types, are typically compacted after being placed — think of a gravel driveway base that gets run over with a plate compactor, or fill dirt that gets tamped down in layers. Compaction reduces the material’s volume once it settles, meaning the loose volume you order needs to be somewhat more than the finished, compacted volume you actually want.
A rough compaction factor for gravel is often cited around 20 to 25%, meaning you might need to order roughly that much more material than your straightforward length × width × depth calculation suggests, if the final compacted depth is what you’re solving for. This is worth confirming with your specific supplier or contractor, since compaction rates vary meaningfully depending on the exact material and how heavily it will be compacted.
Platform Variations Worth Knowing
- Mulch and soil calculators typically default to inches for depth and expect fairly shallow measurements (2-6 inches), since that matches typical garden bed and lawn application depths.
- Gravel and stone calculators often include a compaction adjustment option built directly into the tool, since gravel is compacted so frequently that many suppliers expect their calculators to account for it automatically.
- Concrete calculators frequently ask for depth in inches but sometimes present results in both cubic yards and bags of pre-mixed concrete, since DIY concrete projects often use bagged mix rather than a truck delivery, and the conversion between the two isn’t obvious without a dedicated calculator.
- Supplier-specific calculators (found on a landscaping company or hardware store’s own website) sometimes round results up automatically to match their specific delivery increments or minimum order sizes, which can produce a slightly different number than a generic calculator — always check the specific supplier’s minimum order policy before finalizing your order.
Pro Tips
- Measure twice, especially for irregular yards. A small measurement error compounds significantly once it’s multiplied across length, width, and depth, so double-checking your initial measurements is worth the extra few minutes.
- Ask your supplier about their specific delivery increments before finalizing an order, since some sell by the quarter-yard, others only in full or half-yard minimums, and this affects how you should round your calculated total.
- Keep a running note of past projects’ actual usage versus calculated usage. Over time, this personal record becomes more useful than any generic buffer percentage, since it reflects your own project style and how much waste you personally tend to have.
- For concrete, always consult a professional for structural pours (foundations, load-bearing slabs) — a cubic yard calculator handles the material volume math, but structural depth and reinforcement requirements are a separate, code-driven decision that a calculator can’t make for you.
- Convert all measurements to the same unit before calculating, whether you’re using an online tool or doing it by hand — mixing feet and inches without converting is the most common source of wildly incorrect results.
Troubleshooting Common Issues
- My calculated result seems way too high or too low. Double-check that depth was converted to feet (or that you used a calculator field specifically labeled for inches, if that’s what you entered). Mixing units is by far the most common cause of an obviously wrong result.
- I measured an irregular yard and I’m not sure how to calculate it. Break the space into smaller rectangular or triangular sections, calculate each one separately using the same length × width × depth formula, then add all the section totals together at the end.
- My supplier’s delivered amount didn’t match what I ordered. Some suppliers round to their nearest sellable increment (quarter-yard, half-yard, or full yard) rather than delivering an exact fractional amount, so a small difference between your calculated figure and the delivered amount is normal and expected.
- I ran short of material partway through the project. This usually means the waste and settling buffer wasn’t factored in, or the material compacted more than expected once spread. For future projects, build in the 5-10% buffer discussed in Step 5, and a larger buffer specifically for materials that get compacted.
- My custom-built calculator gives a negative or NaN result. This typically means one of the input fields was left empty or contains text instead of a number. Add a basic validation check in your JavaScript to confirm all three fields contain valid positive numbers before running the calculation.
Conclusion
A cubic yard calculator turns a genuinely confusing measurement problem into a quick, reliable number, but the calculator itself is only as good as the measurements and material knowledge you feed into it. Measure carefully, convert your units consistently, factor in a reasonable buffer for waste and compaction, and round to whatever increment your supplier actually sells. Whether you’re ordering mulch for a weekend garden refresh or gravel for a full driveway base, getting this right the first time means avoiding both a wasted second delivery and a pile of leftover material with nowhere to go.
Frequently Asked Questions
1. How many cubic feet are in a cubic yard?
There are 27 cubic feet in one cubic yard, since a cubic yard is a cube measuring 3 feet on each side (3 × 3 × 3 = 27).
2. Do I need to convert my measurements before using a calculator?
Most online calculators let you choose your input units (feet, inches, yards) directly, but if you’re calculating manually, always convert everything to feet before multiplying length, width, and depth to avoid the most common calculation error.
3. How much extra material should I order for waste?
A common guideline is 5 to 10% extra for most landscaping materials like mulch, soil, and gravel, with concrete often warranting a similar or slightly larger buffer given how costly and disruptive running short mid-pour can be.
4. Does a cubic yard weigh the same for every material?
No. Weight per cubic yard varies significantly by material — a cubic yard of mulch is much lighter than a cubic yard of gravel or wet concrete, since weight depends on the material’s density, not its volume. Check with your supplier if weight matters for delivery or vehicle load limits.
5. Why did my supplier deliver a slightly different amount than I calculated?
Many suppliers only sell in specific increments, such as quarter-yard or half-yard units, and will round your order up to their nearest sellable amount rather than delivering an exact fractional yard.
6. How do I calculate cubic yards for an irregularly shaped area?
Divide the space into smaller, easier-to-measure rectangular or triangular sections, calculate the cubic yardage for each section individually, then add all the individual totals together for your final number.
7. Should I account for compaction when ordering gravel?
Yes, if the gravel will be compacted after placement, such as for a driveway base. Loose gravel volume decreases once compacted, so ordering slightly more than your straightforward calculation suggests helps ensure you reach your intended finished depth.
8. Can I use a cubic yard calculator for concrete pours?
Yes, the same basic length × width × depth formula applies, though concrete projects typically warrant extra care with depth accuracy and a larger waste buffer, and structural pours should always be confirmed against local building codes or a professional’s specifications rather than relying on a calculator alone.
