# How the cost of ingredients and products is calculated

The cost of ingredients and products is based on supplies and calculated by the** weighted average cost formula**.

💡 The cost of ingredients and products is calculated by the formula:

**total cost of ingredient in stock / amount of ingredient in stock.**

For example, there were two supplies of oranges with different amount and cost: 10 kg for $3 and 5 kg for $5. So the cost will be:

(10 kg × $3 + 5 kg × $5) / (10 kg + 5 kg) = $3,67 for 1 kg of oranges.

# How the cost of dishes and preparations is calculated

The cost of dishes and preparations consists of the total cost of their ingredients.

For example, Poster will calculate the cost of the Avocado Caprese dish as a sum of the cost of the components of the dish:

$1,20 + $0,85 + $0,10 + $0,01 + $0,01 + $0,04 + $0,01 = $2,22

☝️ The cost of manufactured dishes and preparations is the sum of the cost of their ingredients in stock at the time of manufacture.

# How the cost of products out of stock is calculated

Poster ingredient costs are 0 **unless they were supplied before.** Containing such costless ingredients in preparation or dish recipes makes their total dish costs irrelevant.

To track 0 cost ingredients, Poster **highlights with yellow** dish and prep costs with ingredients of 0 cost.

If you haven’t supplied products, their number in stock will become negative after the sale. Once missing ingredients are supplied, the cost of the closed receipts will be updated.

The cost is calculated according to the **latest weighted average cost** when the products were in stock. Missing products save their latest cost.

The ingredient cost is averaged from the last full inventory check to the next inventory check of your stock. If you don't want the ingredient cost to be averaged, run an inventory check.