> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://regiostech.crisp.help/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Number Calculation Conditions

This article explains how to use **number calculation conditions** to create powerful, flexible discounts. Calculations let you define a number dynamically and store it in a variable for future comparisons.

 [![](https://storage.crisp.chat/users/helpdesk/website/-/d/1/3/e/d13e90de659a8800/image_bryh5n.png)](https://www.loom.com/share/c51cec1509514e46b881c739503767c5?sid=4b3cbe3e-9afb-4eed-9f79-03c746460ba6)

📽️ Click the thumbnail above to watch a video demonstration.

## Example Use Cases
* “Apply a discount if quantity of Product A is 3× the quantity of Product B”
* “Calculate total quantity of products in Collection X and store it for later”
* “Create tiered discounts based on the sum of specific quantities”

## What Are Calculations?
![Screenshot of a calculation condition that multiplies the count of specific products by 3](https://storage.crisp.chat/users/helpdesk/website/-/d/1/3/e/d13e90de659a8800/image_ml3968.png)

Calculations are a type of condition that **compute a number and assign it to a variable**. You can then:
* Reference that variable later in your logic
* Use arithmetic (+, −, ×, ÷)
* Work with dynamic values like product quantities, cart totals, or other calculations

## How to Use It
### 1. Add a Calculation
* In the **Logic Builder**, click **Add Criteria**
* Select **Calculate a Number**
### 2. Configure the Expression
* Use math operators to combine terms
* Example:
→ `Quantity of Product A` × `3` = `quantity_times_three`
* This assigns a variable called `quantity_times_three`
### 3. Use the Result
* Add a **Compare Numbers** condition
* Left side: `Quantity of Product B`
* Right side: the variable `quantity_times_three`
* Now the logic says: “Only apply the discount if quantity of B equals 3× A”

## Notes
* You can combine constants, quantities, and even other calculated values
* Calculations don’t do anything on their own—they must be **used** later in a condition
* Use clear variable names so the logic is easy to follow

## Your Feedback Matters
Your review helps keep this small business running. Please [leave one](https://apps.shopify.com/regios-automatic-discounts#modal-show=ReviewListingModal) on the Shopify App Store.