Sometimes a WooCommerce product does not have one price. It has a price that depends on a number the customer gives you: how many metres, how big, how many. You do not want a hundred variations for every size. You want a custom price field, one box the customer fills in, and a price that follows it.
This is a short, exact guide to adding a WooCommerce custom price field that sets the product price from user input. I build the plugin I use for it, and the basic version is free, so you can try this today without spending anything.
Quick answer: Add a price calculator with a number field and a one-line formula. The customer types a value (say 15), your formula turns it into the price (
qty * 12becomes $180), and the total updates live. The price is re-checked on your server at add-to-cart, and it is saved on the order. Free version of PriceWise does exactly this.
Two things “custom price field” can mean
Worth clearing up before you install anything, because the two are different jobs:
- Price calculated from input (this guide). The customer enters a measurement or a quantity, and your rule works out the price. They do not choose the price; the maths does.
- Name your price (a different feature). The customer literally types the amount they want to pay, like a donation or pay-what-you-want. If that is what you need, look for a “name your price” plugin instead; that is not what a calculator does.
Most stores asking for a custom price field want the first one: a price that follows what the customer enters. So that is what you will build.
How to add a custom price field, step by step
Step 1: Add a number field. In Calculator Pro > Add New, on the Fields tab, add a Number field. Give it a label the customer understands (“Length in metres”, “How many?”) and a short field name you will use in the formula, like qty.

Step 2: Write the price rule. On the Formula tab, type how the price is worked out. For $12 per unit:
qty * 12

Step 3: Assign it and test. Attach the calculator to your product (it needs a regular price set), open the page, and type a number in the field. The price updates live. Type 15, and you get $180.
That is the whole thing. One field, one line, a custom price per customer.
Useful variations on the rule
The formula is where custom price fields get powerful. A few that come up a lot:
- A minimum charge:
max(qty * 12, 40)charges per unit but never less than $40. - Two fields, priced by area: add
lengthandwidth, thenlength * width * 45. - Round up to whole units:
ceil(qty / 10) * 10 * 12bills in packs of ten. - A setup fee on top:
(qty * 12) + 15adds a flat $15.
The field names are yours, and the functions round, ceil, floor, min, max, abs, and if are all available. If you sell by area, weight, or the metre, the complete price calculator guide maps the common setups.
See it working first: the live demos are things I sell, priced by the plugin itself. Type a value and watch the price move.
Can I do this for free?
Yes. A number field plus a formula is the whole free version of PriceWise, so a custom price from user input costs nothing. Pro ($49 a year, or $99 once) adds the things you graduate into: a dedicated measurement field with waste and box rounding, price tables, option fields with swatches and file upload, and PDF quotes. For a plain custom price field, free is enough.
FAQ
Can the customer set any price they want? No, not with a calculator. They enter a value, and your rule decides the price. For customer-set prices (donations, pay what you want), use a name-your-price plugin instead.
Can they fake the price by editing the page? No. The live total is only for showing. At add-to-cart your server runs the formula again with their input and uses that.
Can I use more than one field? Yes. Add as many as you need and combine them in the formula, like length * width * rate.
Does the customer’s number show on the order? Yes. Their input and the calculated price are saved on the cart line and the order, so you know what they asked for.
That is it
A custom price field in WooCommerce is one number field and one formula. Add it, write the rule, test it, done. It runs on PriceWise, free to start, and the documentation covers the rest if your rule gets fancy.