Common Formula Errors and How to Fix Them

Getting unexpected prices or formula errors?


The most common issues merchants run into with the Custom Price Calculator formula, and how to fix each one.


The price shows a dash instead of a number


What it means: the calculator cannot work out a price at all, so it shows a dash rather than a made-up one. You will also see a message on the Formula box, and the calculator will refuse to save until it is fixed. This is deliberate. A calculator that cannot price would otherwise go live showing $0.00.


The quickest fix: press Fix my formula underneath the formula box. It sends Calcy the formula with your customers' values filled in, which is what reveals the cause, and Calcy will explain it in plain words and offer to correct it.


The two most common causes:


Two fields with overlapping names. If a price table is called "Thickness Table" and a dropdown is called "Thickness", the shorter name is matched first and the formula stops making sense. Rename one so that neither name sits inside the other.


Dividing by a field that can be zero. If a quantity or size box can be left at zero, dividing by it has no answer. Set that field's minimum above zero, or guard the division, for example IF(Quantity > 0, Design fee / Quantity, 0).


Other causes are possible, and the same check catches them all. If Calcy cannot resolve it, send us your formula and your field names and we will look.


The price is stuck at $0.00


Cause: the formula is genuinely working out to zero, usually because a field it relies on is empty or every option is priced at zero.


How to fix it:

  • Check that every option in your dropdowns and swatches has a price against it, rather than being left at 0.
  • Make fields that must be filled in required, so they cannot be left blank.
  • Enter values in every field and watch the price update as you go, to see which one leaves it at zero.


"Invalid formula" when saving


Cause: the formula uses something the engine does not accept.


How to fix it:


  • Check element labels character by character, especially any with spaces.
  • Use only the supported operators: + - * / parentheses, and the comparisons > < >= <= == !=.
  • Use only the supported functions: ceil(), ceiling(), floor(), sqrt(), if(), max(), min(), and(), or(). These can be nested.
  • round(), abs(), pow() and ^ are not available.
  • Never write a Math. prefix — ceil(Width), not Math.ceil(Width).
  • One calculation cannot reference another. Write the full logic out in each formula.


The preview is more forgiving than the save gate, so a formula can look fine in preview and still be rejected. The save gate is the one that counts.


Cart still shows the base variant price, not the calculated price


Cause: on the non-variant flow, Shopify's cart template always renders the original variant price on the line. The subtotal and the amount charged at checkout are correct.


How to fix it: nothing to fix — the per-line display is controlled by Shopify, not the app. If the charged amount is wrong, that is a different problem; contact support with your store URL.


If you have just changed theme, hard-refresh first. Cached theme assets can keep showing the old behaviour.


How do I set a minimum price?


There are two different settings, and picking the wrong one is a common source of confusion.


Minimum Value, on an individual input, stops a customer entering a width below 10 or a quantity below 1. It works per field, not on the total.


Minimum Formula Value, in the calculator's settings, floors the finished price. This is what you want for "no order under $25". It also fixes the "calculator shows 0.00 before anything is entered" problem, which matters if Google Merchant Center is rejecting the product.


You can also floor the price inside the formula:


max(Width * Height * Rate, 25)


One trap: Minimum Formula Value floors the whole result, so an add-on fee can be swallowed on small orders until the total climbs above the floor. If that bites, set minimums on the input fields instead so the formula reaches the floor naturally.


Price has too many decimal places


Cause: the result is not being rounded for display.


How to fix it: set Formula Output Decimals to 2 in the calculator's settings. There is no round() function — this setting is how money gets rounded.


For rounding to whole units of material rather than currency, ceil() and floor() work inside the formula.


How do I use the Shopify product price in my formula?


Use the reserved variable shopify_product_price. It pulls the product's own price in, so one calculator can serve hundreds of products at different prices:


shopify_product_price * Meters


shopify_price is not a real variable and will fail validation.


A flat base price plus calculated add-ons


Add the base as a number:


50 + (Width * Height * Rate)


Or use the product's own price as the base:


shopify_product_price + Installation


Frequently asked


My cart shows the wrong price. See "Cart still shows the base variant price" above.


My total can still go below the amount I want. You are probably using the field-level Minimum Value. Use Minimum Formula Value in the calculator's settings, or wrap the formula in max().


My formula looks right but returns NaN. An optional field is empty. Make it required, or give it a default.


Can I charge a different rate above a certain size? Yes — if(Width > 45, 85, 0) added to your formula. For three or more bands, a Data Lookup in range mode is easier to maintain.


Still getting unexpected results?


Send support your store URL and the product page, and say what you expected versus what you saw. Attaching the formula itself saves a round trip.

Updated on: 08/09/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!