# Run a calculation

{% hint style="info" %}
User permission: Rebates
{% endhint %}

Run a calculation for an individual rebate rule, a selection of rules, or all rules simultaneously. The calculation method used is defined in the rule setup. Calculations can span up to 12 months.

{% embed url="<https://phocassoftware.wistia.com/medias/jdh6oc8n1l>" %}
Calculating rules
{% endembed %}

{% hint style="warning" %}
Be careful, as Rebates does not check if the calculation results have already been posted. You might run the same calculation over and over again without realizing it. Similarly, each time you run a calculation, it replaces the previous results.
{% endhint %}

1. Start the calculation from either of these two places:
   * On the project’s page > **Rules** tab, select the checkboxes of the rule(s) (or click the **Select All** button in the top-left corner of the grid), then click **Calculate**.

     <div align="left"><figure><img src="https://content.gitbook.com/content/MbR0klD6u5c0D9XeXtY3/blobs/D9WQJFtK1O0esvOaBNDE/3469312078.png" alt="image-20240502-030154.png" width="491"><figcaption></figcaption></figure></div>
   * Within an individual rule setup screen, ensure you have saved the rule, then click the **Calculate** button on the **Results** section header.

     <div align="left"><figure><img src="https://content.gitbook.com/content/MbR0klD6u5c0D9XeXtY3/blobs/L1OkFcVYy4rs0OuZfBrL/3469213855.png" alt="image-20240502-030242.png" width="725"><figcaption></figcaption></figure></div>
2. In the **Calculate** window, enter the calculation information (or update the information carried over from the last calculation):
   * **Description** of the calculation.
   * **Transaction Start Date** and **Transaction Start Date**: Set the start and end months for the period you want to include in the calculation. \
     Notes:
     * Calculations are limited to a 12-month period.
     * If you are running a calculation on a *monthly* bracket period, a collection of months is treated as a single period, rather than as individual months. For example, to get results from a quarter, you could set the transaction period from January to March.&#x20;
     * Rebates that are valid for a portion of the calculation period (i.e., the period defined by the transaction start and end months) are calculated only for that portion. For example, if you have a rebate that is valid from June to December and you run a calculation based on transactions over May to August, then only the portion relating to July/August will be calculated. If your calculation includes rebates in this category, a confirmation screen will appear listing these rebates and asking whether you want to proceed. If at this stage you want to revise the rebates, select **No** and change the transaction start and/or end months.
3. Click **Calculate**.&#x20;
4. Proceed to [view the calculation results](https://docs.phocassoftware.com/rebates/calculations/view-calculation-results-and-transactions).&#x20;
