May 21, 2025
If you sell products priced by length, area, volume, or any custom measurement — flooring, fabric, cable, blinds, glass, or even bulk soil — chances are, you need more than WooCommerce’s default pricing options. That’s where a measurement price calculator comes in.
A WooCommerce measurement price calculator lets customers enter their required dimensions — like length and width — and automatically calculates the final price based on those inputs.
This kind of measurement-based pricing is essential for stores that sell by the square meter, linear foot, liter, or any unit beyond standard quantity. It removes confusion for customers, ensures accurate pricing, and reduces manual admin work.
However, setting up unit pricing or dynamic pricing by measurements in WooCommerce isn’t straightforward out of the box. WooCommerce doesn’t provide built-in support for calculations based on custom input fields like dimensions or volume. That means you’ll need to use an additional plugin to make it work.
In this tutorial, we’ll explain step-by-step how to build a measurement price calculator using Barn2’s WooCommerce Product Options plugin. Whether you’re selling made-to-measure products or bulk materials, this guide will show you how to create a professional, user-friendly pricing tool.
To create a measurement price calculator in WooCommerce, you’ll need a few key tools:
Once you have these in place, you’ll be ready to build a seamless pricing experience that adjusts based on your customers’ input. It’s perfect for any store that needs measurement-based pricing or unit pricing.
To start, create a new product in your WooCommerce dashboard by going to Products → Add New. Give it a clear title, for example, Custom Cut Carpet and add a description that explains how the pricing works based on customer measurements.
Next, set the product type to Simple product, and enter a base price. This base price is optional. You can use it as a placeholder or a minimum price for the product. Later, when you set up your measurement price calculator, you’ll be able to choose whether to:
Using conditional logic, you can also control which input fields appear based on other customer selections. For instance, if you sell different types of carpets, you might first ask the customer to choose between Plush Carpet or Berber Carpet.
Then, based on their choice, you can show the relevant measurement fields or even different pricing formulas.
This setup gives you full control over how the product is presented and ensures customers only see what’s relevant to their selection, which keeps the buying experience clean and intuitive.
Now that your product is set up, it’s time to add the input fields that allow customers to enter their required measurements (like length and width). This is where the pricing magic begins.
If you’re using a page builder like Breakdance, you can create a custom layout for your product form that fits your design preferences. Breakdance makes it easy to structure your product page and display form fields in a visually appealing way and works seamlessly with the WooCommerce Product Options plugin.
Note: the WooCommerce Product Options plugin works equally well with the default block editor.
To get started, go to Products → Product Options. From here, click Add Group and enter a Group name, choose Visibility settings, and set Inclusions and Exclusions. I’ve decided to call the group Carpet Measurement Price Calculator and set visibility to Show on specific categories or products because I only want it to appear on the Custom Cut Carpet product page. Next, I simply select the product from the Inclusions option.
Once that’s done, click the Add Option button to begin creating your measurement input fields.
For a typical measurement-based product, you might want to add the following dimensions as options:
The easiest way to do this is by adding Number fields for each dimension. You can customize the field label, placeholder text, and minimum or maximum values to match your product’s constraints.
Click the Save changes button to proceed.
If you prefer to let customers choose from pre-set sizes, you can use radio buttons, dropdowns, or checkboxes instead. When using non-numeric fields like these, you’ll need to assign each option a hidden Formula Value that will be used in the price calculation. Barn2 provides step-by-step instructions for this in their documentation.
For example, if a customer selects “Small” (1m × 1m), “Medium” (2m × 2m), or “Large” (3m × 3m), you can attach the relevant size values behind the scenes, and those will be used in your price formula.
This flexible field setup allows you to collect exactly the information you need for accurate, measurement-based pricing — no code required.
With your input fields ready, you can turn those customer-provided values into a live, dynamic price. This is where the WooCommerce Product Options plugin comes in with its built-in calculated fields.
Head to the same Product Options tab where you added your measurement fields. Click Add Option, and this time, choose Price formula as the field type.
Now it’s time to create the measurement price calculator. To do this, you either need to create the formula manually, or you can use the plugin’s Price Formula AI Bot to create it for you.
Let’s say you’re selling fabric by the square meter. You might have two number inputs — Length and Width — entered in meters. You’ll now create a formula like: Length × Width × 25
In this example, 25 is the price per square meter. The plugin lets you insert field names directly into the formula using smart tags like {field_name}. Each field you create gets a unique identifier, and you can easily reference those when building your formula.
The formula might look something like this: {Length} * {Width} * 25
The best part is that the price updates live on the front-end as customers input their measurements. There’s no need to refresh the page or guess the cost. Buyers can see their total price change in real time, which helps reduce friction and increases conversion.
Whether you’re offering pricing by square meter, length-based pricing, or a more complex WooCommerce price calculator by dimensions, this step makes it all possible without writing custom code. All you need is the correct formula.
And that’s it! You’ve successfully created a measurement price calculator in WooCommerce without having to code.
This setup gives you the flexibility to charge accurately based on user input. It works for all sorts of stores that need measurement-based pricing, whether it’s flooring, fabric, blinds, or anything else sold by length, area, or volume.
What used to require custom code or expensive developer help can now be done visually, thanks to tools like WooCommerce Product Options and a flexible page builder like Breakdance. You can use custom input fields and real-time calculated pricing to offer customers a smooth and intuitive shopping experience.
If you want to explore more advanced features or try it for your own store, check out WooCommerce Product Options by Barn2.
Yes, but not with the default setup. Out of the box, WooCommerce doesn’t support dynamic pricing based on user-entered measurements like length, area, or volume. To enable this functionality, you’ll need a plugin like WooCommerce Product Options, which lets you add custom fields and use formulas to calculate prices based on dimensions or quantities.
To set up pricing per square meter, you can use number fields to collect length and width, then create a calculated field that multiplies those values by your rate per square meter. For example, {length} × {width} × price_per_m². The total updates live on the product page, giving customers instant feedback as they enter their measurements.
To create a measurement price calculator in WooCommerce, you’ll need a plugin that supports calculated fields, such as WooCommerce Product Options by Barn2. Start by adding custom input fields to your product (like Length and Width), then use a price formula to multiply those inputs by your unit rate (e.g. {Length} × {Width} × 25). The final price updates live on the product page as customers enter their measurements. This setup works great for products sold by area, length, volume, or any unit, and requires no custom code.
A measurement price calculator is ideal for any product sold by size, area, length, volume, or custom units. This includes items like carpet, fabric, glass, cable, blinds, tiles, turf, bulk soil, mulch, metal sheeting, and made-to-measure products. If your pricing depends on dimensions entered by the customer (such as square meters, linear feet, or liters), this type of calculator ensures accurate pricing and a seamless buying experience.
Get maximum flexibility with unlimited licensing and domain activations.
Get your money back within 60 days of purchase, no questions asked. It's risk-free!
We offer premium support to ensure the ultimate customer experience.
For a limited time, we're offering an unlimited site license for just $199.99/year. Buy now to lock in this price.