How does Greenline calculate the cost of a product?

The short answer is through purchase orders. Purchase orders can be accessed through your Dashboard > Purchase orders, where you can enter your quantity and cost information.

But what happens when you buy Product A for $10.00 last week, but $9.50 this week? To solve this problem, Greenline presents users with 2 options.

### Default option: Last Cost

Companies start with the last cost option. What this means is:

- You order products at $10.00
- The product cost is now $10.00
- All sales from this point on have a $10.00 cost
- You then order products at $9.50
- The product cost is now $9.50
- All sales from this point on have a $9.50 cost

It is a simple and easy to understand pricing strategy that approximates profit margins over time. The shortcoming is that it does not account for existing inventory at the time of a new purchase order. If your store has stricter pricing policies, then you may be interested in the second option, laid out below.

### Option 2: Weighted Average

This setting can be enabled in your Dashboard > Company settings pages. How the weighted average cost works is:

- You order 10 products at $10.00
- The product cost is now $10.00
- This means the value of your current item inventory is $100 (10 * $10)
- All sales from this point on have a $10.00 cost (but let's assume no sales have been made yet)
- You order 10 more products at $9.50
- The value of your newly received item inventory is $95 (10 * $9.50)
- Your total inventory quantity after receiving is now 20 (10 + 10)
- The product cost uses the following formula

- The formula values are: (10 * 10 + 10 * 9.5) / (10 + 10) = $9.75
- The product cost is now $9.75
- All sales from this point on have a $9.75 cost

You can see that this results in a much more accurate cost calculation that takes the existing inventory into account. However, it can be harder to understand, and much more difficult to debug.

### What to do if a cost is incorrect

Costs can often be incorrect when there are manual entry errors with purchase orders. If there is a mistake, we recommend editing the product cost directly in the product itself.

Click the "Purchase cost" button, view the disclaimer, then the costs can be edited.

Editing costs will not affect historical margins.