Pricing Variables

Pricing Variables

Overview

Pricing variables are named, computed values that act as intermediate steps in your pricing logic. Instead of writing one large formula, you can break the calculation into smaller, readable pieces — each stored as a variable — and reference them in later formulas or in the total price formula. You configure variables in Calculator Editor → Options & Pricing → Variables.

Steps

  1. In the Variables section, click + Add Variable.
  2. Give the variable a name (e.g., AREA or MATERIAL_RATE). This becomes the key you reference elsewhere.
  3. Enter a formula that computes the value. You can reference option values with OPT("KEY") or INPUT("KEY"), pricing tables with TABLE(), and other variables with VAR("KEY").
  4. Use the variable in other formulas by referencing it with VAR("KEY").
  5. Reorder or delete variables using the action buttons on each row.

Details

Field Description
Variable name A unique identifier used to reference this variable in other formulas via VAR("KEY").
Variable formula A formula expression that computes the variable's value. Can reference options, tables, and other variables.
  • Variables are evaluated in order from top to bottom, so a variable can reference any variable above it in the list.
  • Renaming a variable updates its key — make sure to update any formulas that reference the old name.
  • Variables appear in the formula editor's autocomplete suggestions.

Examples

  • Area calculation — Variable name: AREA, Formula: INPUT("WIDTH") * INPUT("HEIGHT"). Then use it in the total price formula: VAR("AREA") * TABLE("rates", OPT("MATERIAL")).
  • Weight per unit — Variable name: UNIT_WEIGHT, Formula: TABLE("weights", OPT("SIZE")). Reference VAR("UNIT_WEIGHT") in both the pricing formula and the weight calculation formula.
    • Related Articles

    • How Pricing Works

      Overview Calculator AI uses a multi-stage pricing pipeline to turn customer selections into a final price. Each stage feeds into the next, so you can build pricing as simple or as complex as your product requires — from a flat price to formulas that ...
    • Pricing Tables

      Overview Pricing tables are reusable lookup tables that store pricing data outside of your calculator formulas. Instead of hardcoding prices or building complex nested conditions, you define your data in a table and reference it from any calculator's ...
    • Checkout Pricing

      Overview When a customer configures a product using a Calculator AI calculator and adds it to their cart, the calculated price is applied automatically at checkout. No manual setup or discount codes are needed — the customer is charged the amount ...
    • Subscription & Pricing

      Overview Calculator AI includes a 14-day free trial, after which you activate a single subscription that includes all features. Your monthly price scales automatically based on your calculator usage — there are no plan tiers to choose between, no ...
    • Weight Calculation

      Overview Weight calculation lets you define a formula that computes a product's shipping weight based on customer selections. The calculated weight is saved with the order so your shipping provider can use it to quote accurate rates. You configure it ...