The formula for Clearly Inventory's average cost is as follows:
"(Quantity Increase X Cost per Unit) + (Current Quantity X Current Average Cost) / (Quantity Increase + Current Quantity) = Current Average Cost"
Average costs are only calculated when an item's stock level of an item record is INCREASED. In theory, every item record can have a unique average cost (items can have multiple records, for instance, you might have an item stored in different locations, or different units of measure).
Adding, Moving, or Converting stock, all involve increases in the quantity of an item record, so these actions always prompt an new average cost calculation, for the affected records.
The total value of stock for an item is the sum total of the each records average cost multiplied by each records quantity.
For example, let's say you have individual cans of Coke as well as cases.
If you have 100 cans of coke at an average cost of .50 ea, then the value of that record is $50.
If you have 2 Cases of coke at an average cost of $4.00 per case, then the value of that record is $8.00.
And the total value of the item "Coke" is $58.00.
Removing, or clearing items or records does not affect the average cost of an item. When an item's stock for a given record reaches 0, the average cost is 0.
The system does not keep an 'average cost history', but rather a transaction history, which can be used to find the actual cost of any individual item transaction.