# Calculate S.R. Through Formula

**YouTube:** [How to Calculate Sale Rate Using a Formula in Purchase ?](https://www.youtube.com/watch?v=y5pJxFb7CIE)

## How to Calculate Sale Rate Using a Formula in Purchase?

In this tutorial, we will demonstrate how Logic ERP can automatically calculate the sale rate based on a predefined formula within the **purchase voucher**.

***

### **Step-by-Step Guide:**

* Navigate to **Purchase Configuration**.
* Locate and enable the option: **“Calculate S.R. Through Formula.”**

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2F7RsF0eprEewYBAv0RGgk%2FConfiguration.png?alt=media&#x26;token=55457929-fe7c-4248-9b3d-1530cfccb609" alt=""><figcaption><p>Let's keep this feature enabled to observe its Impact on Billing.</p></figcaption></figure>

* **Define the Sale Rate Formula**:
  * Navigate to the **Define Rate Formulas** Other Settings - 1.
  * Specify the **Expense Name** relevant to the calculation.
  * Set the **Base Rate**, usually the **Purchase Rate**.
  * Optionally, define a **default value** for any expense that needs to be **added or subtracted** from the base rate.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FjZM3wW2o9ktFo88LbPm1%2FDefine%20Rate%20Formula.png?alt=media&#x26;token=657a154f-376e-4e4c-abcb-a576adbe0d43" alt=""><figcaption></figcaption></figure>

* **Use Related Fields in Formula**:
  * You can include variables such as margin percentage, additional costs, or discounts.
  * **Example**: If the Purchase Rate is ₹100 and a 20% margin is added, the **Sale Rate will be ₹120**.

***

### **Create a Purchase Voucher:**

* Enter the **transaction details** and input the **basic purchase rate** for each item.
* The **Sale Rate** will now be **automatically calculated** based on your defined formula.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FcULOjo5FNtR6ISH7ZYPC%2FSale%20Rate.png?alt=media&#x26;token=f9be59a5-7a05-49b8-be8d-52b895a738f3" alt=""><figcaption></figcaption></figure>

***

### **Conclusion**:

This feature helps **automate pricing**, eliminate manual errors, and ensures consistency in sale rates across transactions in Logic ERP.
