How to calculate
Allocate the units sold to the oldest lots first. Multiply units assigned to each lot by its unit cost. The unassigned units make up ending inventory.
Worked example
Use Units sold 12 · Lots, oldest first (quantity, cost per unit in USD) 10, 4 / 10, 6. The result is 52.00 USD.
Input and result notes
Enter one inventory lot per line. Use chronological order, with the first lot at the top. This applies to the entire period’s sales.
OpenStax on inventory valuation