To determine the cost of goods sold (COGS) expense under the LIFO method, you start with the assumption that you have sold the most recent produced first, and work backwards.
Generally, the formula for COGS expense is:
Costs at the beginning of the year + Additional inventory cost during the year - Inventory at the end of the year