
A 30 × 30 cm acrylic offcut should not check out at €4.80. An 8 × 3 m banner should not silently price at whatever the formula spits out if someone types an extra zero. Searching Shopify price formula Math.min Math.max usually means you already have width × height working — you just need a floor, a ceiling, and rounding that the customer sees before Add to cart.
Shopify variants will not store `Math.max`. Theme line-item properties (`properties[Width]`) sit on the order line and do not change the price. Options Price Calculator exposes system helpers in the formula builder: `Math.min`, `Math.max`, `Math.ceil`, `Math.floor`, `Math.round` (Variables and Field Values). The generic formula walkthrough is in formula-based pricing. Enforcing a minimum price covers a floor as a merchant goal. This article is the toolkit: pick the larger number, pick the smaller number, round once at the end.
Adding variants caps you at three options per product and 2048 variants. The old 100-variant ceiling is gone. Colour, thickness and finish already fill the three slots. A “starter price” SKU is inventory you will never receive from the sheet supplier.
Keep real stock as variants. Leave continuous centimetres and the floor/cap in the formula.
Do not confuse helpers with Product price limits under General. Limits block Add to cart when the calculated price is too low or too high (docs example: min `10.00`, max `500.00`). `Math.max` still lets the customer buy — they pay at least the floor. `Math.min` clips an oversized result. Limits refuse the cart; helpers rewrite the number.
Size buckets as variants. S/M/L plus a paragraph “small pieces from €49”. Anything between sizes becomes an email quote.
General minimum only. The button fails. Shoppers never see a “from” price, only a dead Add to cart. Useful when you truly will not sell below a threshold. Useless when you want the 30 × 30 piece in the cart at the starter rate.
A Premium conditional for a job `Math.max` already does. Formula example 6 is a Premium if/then: `(product_price + width * height) < 100` then `100`. Valid. Not the only path. A single Starter formula can say `Math.max(…, 100)`. Keep conditionals for tiers, checkbox surcharges, and several breakpoints. Conditional logic is Premium — always label it that way.
None of those give you one product page, SKUs for colour/thickness, and `Math.min` / `Math.max` / rounding as the last chip in the editor.
Options Price Calculator is Built for Shopify (5.0 from 26 reviews). Unlimited product options — listing tags include Numbers, Dimensions, Checkboxes, Dropdowns — plus formulas, without extra variants. Starter $9.99/month: unlimited options, formula builder, metafields, multilingual, AI. Premium $14.99/month: + conditional logic, Font Picker, live preview, price breakdown. Free: 20 uses; always free on a Shopify Develop plan. Billed in USD.
Using the Formula Builder: 4a custom variables, 4b lookup tables (Premium), 4c the formula, 4d calculation display (Premium). The Form fields dropdown inserts rounding / math helpers at the caret. Use the picker; variable names are case-sensitive.
Docs wording matters: helpers are available inside formulas, not inside conditional rules. The condition itself (`width > 200`, `premium_finish == TRUE`) cannot wrap `Math.max`. The Then formula in Conditional pricing *can* use `Math.min`, `Math.max`, `Math.ceil`, `Math.floor`, `Math.round`.
Operators: `+ - × ÷ ( )`. Parentheses first. Same docs: round at the end, not in the middle of an area product.
Patterns:
Floor on variant-rate × area (example 1 adds `product_price + (width * height)`; a per-m² variant rate multiplies instead):
``` Math.max(product_price * width * height, 49) ```
Cap so a mistyped 80 m does not invoice thousands — optionally pair with General limits:
``` Math.min(product_price * width * height, 2200) ```
Both, then nearest whole currency unit:
``` Math.round(Math.max(Math.min(product_price * width * height, 2200), 49)) ```
`product_price` always follows the selected variant. A checkbox contributes its numeric value or `0`. Split a noisy expression in 4a — e.g. a Surface variable `width * height` — then `Math.max(product_price * surface, 49)`.
You are not claiming unlimited Shopify variants, and options do not replace inventory. The sheet in the rack is the variant. The cut size is input.
Clear acrylic, sold by the square metre. Variants: Thickness (3 / 5 / 8 mm) and Finish (gloss / satin). Two options. The customer types width and height in metres. Rate lives on the variant. Offcuts below €49 lose money. Above €1,600 you want a quote, not a silent checkout. The saw steps in millimetres, so you ceil each side.
Number fields `width` and `height`. Custom variable `area`:
``` (Math.ceil(width * 1000) / 1000) * (Math.ceil(height * 1000) / 1000) ```
Main formula:
``` Math.min(Math.max(product_price * area, 49), 1600) ```
Preview: 0.30 × 0.30 must land on 49, not on a few euros. 1.20 × 0.80 at €85/m² should be 81.60 before any floor — above 49, under 1600. 4.00 × 5.00 should hit the cap or, if you prefer a hard stop, set General maximum to 1600 and refuse the cart. Pick one policy per product.
Place the theme app extension. Use the selector picker for price and Add to cart — themes differ; do not claim zero setup. Link the calculator per variant; bulk-link when the formula is identical. Server-side price validation keeps checkout on the formula.
AI generation of options and formulas is Starter+. Treat it as a draft; check helpers with preview values yourself.
Need a higher *rate* above a width, not a hard cap? That is Premium example 7 (`width > 200` → multiplier). `Math.min` is a ceiling, not a tier.
Install Options Price Calculator. Built for Shopify, 5.0 (26).
Keep thickness and finish as native options. Do not add “from-price” as a variant.
Number fields for the cut. Insert `Math.max` / `Math.min` / rounding from the dropdown. Round last.
Preview a tiny piece (floor), a normal piece, an oversized piece (cap or General block).
Link per variant. Theme app extension. Selector picker.
Place a test order. Check line, amount, note. No extra SKU.
Premium if/then floors remain valid — see enforce a minimum price. Use the helper when the rule is literally “larger of these two numbers” or “smaller of these two numbers”.
A Shopify price formula Math.min Math.max is not another variant and not a refused cart by itself. It is the floor, the cap, and the rounding inside the live total. Native Shopify stops at three options and 2048 variants. The calculator owns the continuous size and the helpers.
Put `Math.max` and `Math.min` in Options Price Calculator. The product page states the starter price; your inbox does not.
Services
Reviews
5/5
Mail: info@onlineorigins.nl
Tel: 073 234 0612
KVK: 89825624
BTW: NL865123639B01
Bruistensingel 500,© 2026 Online Origins