Total Price Formula

Total Price Formula

Overview

The Unit price calculation / Total price calculation field (this section is titled Total Price Formula in the nav) is the main place you define how the line price is computed from options and base. You can also set minimum and maximum price caps and a calculator-level discount. Configure it in Calculator Editor → Options & Pricing → Total Price Formula.

If you leave the formula empty, the app still produces a price: see When the formula is empty below.

When the formula is empty

If the formula field is blank (no expression):

  • The runtime uses Initial Price (your calculator base—fixed or variant) plus the sum of each option’s priced contribution (each option’s evaluated formula × rate, for options that contribute to price).
  • Per unit granularity: that sum is treated as the unit price; quantity is applied afterward in the usual way.
  • Total granularity: that sum is treated as the line total for the configured quantity behavior.

After that intermediate price, the app still applies minimum / maximum price, total discount, fixed fees, and quantity discount rules as you configured them.

Use a non-empty formula when you want explicit control—for example VAR("BASE_PRICE") + OPT("A") + OPT("B"), or richer logic with IF(), TABLE(), and computed variables.

Stale compiled formula: If you previously had a formula and cleared it, save the calculator so the app does not reuse an old compiled graph. The editor normally clears this when the field is empty.

Steps

  1. Choose a price granularity mode: Per unit (the formula produces a per-unit price, multiplied by quantity) or Total (the formula produces a single total with quantity already factored in).
  2. Enter your price formula, or leave it empty to use base + sum of option prices automatically. Reference options with OPT("KEY") or INPUT("KEY"), the base with VAR("BASE_PRICE"), calculator variables with VAR("KEY"), Shopify values with VAR("SHOPIFY.PRICE"), etc., and tables with TABLE().
  3. Optionally set a minimum price and/or maximum price to cap the result.
  4. Optionally configure a total discount (see Details below).

Details

Setting Description
Price granularity Controls whether the formula is per-unit or a single total.
Price formula The main formula that computes the price.
Minimum price The lowest price allowed. Leave blank for no minimum.
Maximum price The highest price allowed. Leave blank for no maximum.
Discount type How the discount is calculated (fixed, percent, or formula-based).
Discount value / formula The discount amount, percentage, or formula depending on the type.

Total Discount

The discount section reduces the calculated price before it reaches the cart.

Discount Type Description
Fixed amount Subtract a fixed dollar amount from the total.
Percent Subtract a percentage of the total.
Calculated (amount) Use a formula to compute a dollar-amount discount.
Calculated (percent) Use a formula to compute a percentage discount.

Fixed fees are added after the total price formula is evaluated — you do not need to include them in your formula.

Examples

  • Per-unit area pricing — Granularity: Per unit. Formula: INPUT("WIDTH") * INPUT("HEIGHT") * TABLE("sqft_rates", OPT("MATERIAL")). Min: 10. The customer pays at least $10 per unit.
  • Bundled total with discount — Granularity: Total. Formula: VAR("AREA") * VAR("RATE") * INPUT("QTY"). Discount type: Percent, Value: 10. Every order gets 10% off.
    • Related Articles

    • Formula Editor

      Overview The formula editor appears throughout the calculator editor wherever a calculation is needed — option pricing, variables, fixed fees, price adjustments, weight, and the total price formula. You can find formula fields in Calculator Editor → ...
    • Initial Price (Base Price)

      In the editor, this section is labeled Initial Price. The dropdown inside it is labeled Base price. Overview Initial Price sets the calculator’s base—the starting dollar amount the app uses before stacking option prices and (optionally) your Unit ...
    • Price Adjustments

      Overview Price adjustments are conditional rules that modify the calculated price when certain conditions are met. Each adjustment combines one or more conditions with a formula, letting you add surcharges, apply multipliers, or set overrides based ...
    • Quantity option: inline price

      Overview For Quantity options using Dropdown or Radio list, you can enable Show price and discount inline. Shoppers then see the product line price for each fixed quantity (and for Custom, when a valid quantity is entered). Amounts use the same rules ...
    • Price Summary Display

      Overview The price summary is the breakdown panel customers see alongside your calculator on the storefront. It shows how the final price is composed — options, fees, discounts, and total. You control which fields appear and how the summary is ...