You sell flooring. Or tile, carpet, turf, or wallpaper. The price depends on the room size. A small room costs less than a big one.
But WooCommerce wants one fixed price per product. So how do you charge by the square meter?
In this article, I’ll show you how. You’ll set up a product where the buyer types their width and length, and the price works itself out (length x width x your rate). I’ll use real steps, and I’ll be honest about the tricky parts, like selling by the box.
Quick answer: Plain WooCommerce can’t price by area. Add a price calculator with a Width field, a Length field, and the formula
length x width x rate. The price updates live as the buyer types.
Who needs square-meter pricing
- Flooring: laminate, vinyl, hardwood
- Tiles
- Carpet and rugs
- Artificial turf and decking
- Wallpaper
- Anything sold by the m2 (or the square foot)
If you sell by area, a fixed price just doesn’t work. Every order is a different size.
Why plain WooCommerce can’t do it
A normal WooCommerce product has one price. You set $X and that’s it.
“Use variations,” people say. But variations are pre-made combinations. You’d need one for every possible width and every possible length. 2.1m, 2.2m, 2.3m, times every length. That’s thousands of combinations. Nobody can build that by hand. (I wrote more about variations vs options in how to add multiple options to one product.)
What you actually need is math: length x width x your rate per m2. WooCommerce doesn’t do live math on its own.
The fix: a price calculator
A price calculator adds two boxes to your product page: Width and Length. The buyer types their numbers, and the price updates live using a formula you set.

This is exactly what I built PriceWise Calculator Pro to do. Here’s the full setup with one real example: laminate flooring at $45 per square meter.
How to set it up, step by step
Step 1: Open the builder. In your WordPress menu, go to Calculator Pro and click Add New.
Step 2: Name it and assign it. On the Basic Information tab, set a Calculator Name (like “Flooring price”). Under Assignment Strategy, choose Category Calculator and pick your “Flooring” category.

Step 3: Save it first. Click Save Calculator. You have to save before you can add fields. This catches people.
Step 4: Add two number fields. Go to the Fields tab and click Add Field. Add:
- Field Label “Width (m)”, Field Key
width, Field Type Number. - Field Label “Length (m)”, Field Key
length, Field Type Number.
Keep the keys simple and lowercase. You use them in the formula.

Step 5: Write the formula. Go to the Formula tab and type:
length * width * 45
45 is your price per square meter. Change it to your real rate. The plugin shows “Formula is valid” when it’s right.

Step 6: Choose where it shows, then save. On the Settings tab, pick where the calculator appears on the product page. Click Save Calculator again.
Step 7: Check it on a product. Open a flooring product (make sure it has a regular price set). Type a width and a length. The price updates live.

A buyer wants flooring for a 4m by 3m room. That’s 12 m2. At $45, the price shows $540 before they add to cart. No emails, no quotes, no back and forth.
Warning: The calculator won’t show unless the calculator has at least one field AND the product has a regular price set. If it’s missing, check those two first.
The real-world bits (don’t skip these)
This is where most guides go quiet. Here’s the honest stuff.
Add a bit for waste. Fitters always order extra for cuts and mistakes, usually about 10%. You can build that into the formula:
length * width * 45 * 1.1
That adds 10% on top automatically.
Selling by the box? A lot of flooring is sold by the box, and each box covers a set area (say 2.5 m2). Straight per-m2 pricing won’t round up to full boxes on its own. I’ll be straight with you: PriceWise prices by your formula. It does not auto-round to whole boxes. Two honest options:
- Keep per-m2 pricing, and add a line like “rounded up to full boxes at checkout,” then adjust the order. Simple, but manual.
- Or sell by the box instead: one number field “How many boxes?” times your box price. Cleaner if you only sell full boxes.
Pick the one that matches how you actually sell.
Square feet, not meters? Same setup. Just change the rate and the labels (Width (ft), Length (ft), and your price per square foot).
FAQ
Can I do this for free? Not by area. Free WooCommerce only does fixed prices and variations. Area pricing needs a calculator.
Does the buyer see the price before they buy? Yes. It updates live as they type, then they add to cart at that price.
Can I price by length only, not area? Yes. Use one field: length * rate. Good for things sold by the running meter, like trim or rope.
Will it slow my site down? No. It does the math in the browser and only loads on the products you assign it to.
Before you start
Quick checklist:
- Add a Width field and a Length field (Number type).
- Set the formula
length x width x your rate(add* 1.1for waste). - Put a regular price on the product so the calculator shows.
- Decide how you handle boxes before you go live.
That’s what I built PriceWise Calculator Pro for. It does the live area math, from $39. The documentation has the full details if you want them.