You sell topsoil. Or gravel, mulch, sand, or bark. Two problems hit you online.
One: the price depends on how much the customer needs, and that’s volume, not just area. Two: most customers have no idea how much they need.
WooCommerce wants one fixed price per product. It can’t ask for a size and work out the volume. So you get the emails: “how much do I need for my garden?” and “what does that cost?”.
In this article, I’ll show you how to sell by volume in WooCommerce and fix both problems. The customer enters their length, width, and depth, and the calculator works out the volume and the price for them. I’ll be honest about the landscaping bits too, like settling and selling by the bag.
Quick answer: Volume pricing needs three numbers, not two: length, width, and depth. Add a calculator with those fields and the formula
length * width * depth / 324 * rate(for cubic yards). The volume and the price show as the customer types.
Volume Is Trickier Than Area
Flooring is flat. Length times width gives the area, done. But soil, gravel, and mulch are 3D. You’re filling a space to a depth. So you need depth too.
The maths:
- Cubic yards = length (ft) times width (ft) times depth (in), divided by 324
- Metric: cubic meters = length (m) times width (m) times depth (m)
Then multiply by your price per cubic yard (or per cubic meter).
Depth is the part people forget. A 10 by 10 ft bed is the same area whether you spread mulch 2 inches deep or 4. But that’s double the material and double the cost. So depth has to be its own field.
The Fix: A Volume Calculator On The Product Page
Add three boxes (length, width, depth). The product page does the volume maths and shows the price as the customer types. As a bonus, it also tells them how much they need, which kills the “how much do I order?” emails.

This is what I built PriceWise Calculator Pro for. Here’s the setup for topsoil sold by the cubic yard.
How To Set It Up, Step By Step
Step 1: Open the builder.
Go to Calculator Pro and click Add New.
Step 2: Name it and assign it.
On the Basic Information tab, name it “Topsoil”. Under Assignment Strategy, choose Category Calculator and pick your bulk materials category.
Step 3: Save it first.
Click Save Calculator before adding fields.
Step 4: Add three number fields.
On the Input Fields tab, click Add Field three times:
- Length (ft), key
length, type Number. - Width (ft), key
width, type Number. - Depth (in), key
depth, type Number.

Step 5: Write the formula.
On the Formula Editor tab, for cubic yards at $45 a yard:
length * width * depth / 324 * 45
Change 45 to your price per cubic yard. Selling in metric? Use length * width * depth * rate with all three in meters. The plugin shows “Formula is valid” when it is right.

Step 6: Choose where it shows, then save.
On the Settings tab, pick the position and click Save Calculator.
Step 7: Test it.
Open a product (with a regular price set) and enter 10, 10, and 3. Watch the price update.

Example: a 10 ft by 10 ft bed, 3 inches deep. 10 by 10 by 3, divided by 324, is about 0.93 cubic yards. At $45, that’s around $42. The customer sees the volume and the price before they buy.
Warning: The calculator won’t show unless it has at least one field AND the product has a regular price set.
The Landscaping Bits Most Guides Skip
Always order a bit extra.
Loose materials settle and compact. Most pros add 10 to 15%. You can build it into the formula:
length * width * depth / 324 * 45 * 1.15
Selling by the bag too?
Bulk by volume and bags are different. For bags, use one field, “How many bags?”, times the bag price. Keep bulk and bagged as separate products.
Delivery and minimums.
A volume calculator handles the material price, not delivery. Use WooCommerce shipping for delivery, and set a sensible minimum (a regular price floor, or a note). Bulk materials almost always have a minimum load.
Selling by weight (tonnes)?
Be careful here. Volume to weight depends on the material’s density, and wet soil weighs more than dry. If you price by the tonne, don’t promise an exact volume-to-weight conversion. Price by what you actually sell by.
FAQ
Why do I need depth?
Because volume is area times depth. Same area, deeper layer, more material. Without depth, the price is wrong.
Can it tell customers how much they need?
Yes, that’s the side benefit. They enter their space and see the volume, so fewer “how much?” emails.
Cubic yards or cubic meters?
Either. Just match your formula and labels to the unit you sell in.
Can I do this for free?
No. Plain WooCommerce can’t do volume maths. You need a calculator.
Before You Start
Quick checklist:
- Add three fields: length, width, depth (Number).
- Set the formula for your unit (
length * width * depth / 324 * ratefor cubic yards). - Add 10 to 15% for settling if you want.
- Set a minimum, and handle delivery with WooCommerce shipping.
- Put a regular price on the product so the calculator shows.
That’s what I built PriceWise Calculator Pro for. It does the volume maths and shows customers how much they need, from $39. The documentation has the detail.
Selling flat materials instead? See how to sell by the square meter. Building to a custom size? See made-to-measure products.