> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.haddock.app/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).

# Set the reference price for products

You can now choose the type of reference price you prefer to analyze price changes by product.

1. Open a product page and click the **Edit** button.

![](https://storage.googleapis.com/helpdesk-haddock-images/products/set-the-reference-price-for-products/images/01-set-the-reference-price-for-products.png)

2. Choose the type of reference price you want to use to calculate the price variation.

![](https://storage.googleapis.com/helpdesk-haddock-images/products/set-the-reference-price-for-products/images/02-set-the-reference-price-for-products.png)

1. **Custom amount**. Define the reference price you pay for that product yourself. We will show the variation between the product's last price and the custom amount you added.
2. **Last purchase price**. haddock aligns the reference price with the price on the product's latest invoice.
3. **Weighted average price**. haddock calculates the average price obtained within the period you select.

**PRACTICAL CASE | WEIGHTED AVERAGE PRICE**

We have a fruit shop that buys 1,000 **🍋** at a price of 0.5€ per **🍋**. Imagine it later buys 500 **🍋** at 0.6€ per **🍋**. In total, 1,500 **🍋** have been purchased during the period.

First, we multiply the number of **🍋** by their purchase price (1,000 x 0.5€) and (500 x 0.6€), add everything together, and get 800€.

Now we divide by the total price of the **🍋** and the total quantity of **🍋** we have to obtain the weighted average price.  
​
**WAP =** 800€ / 1,500 **= 0.53€ per 🍋**

In other words, **each 🍋 will have a weighted average price of 0.53€.**

3. You will see the price variation by product based on the reference price you have set.