How does inflation affect the cost of goods sold?

Generally speaking, inflation will increase the cost of goods sold. When and by how much depends on which cost flow assumption (FIFO, LIFO) is used.

Under LIFO (last-in, first out), the latest/higher costs will flow quickly to the cost of goods sold, and the older/lower costs will remain in inventory. If a company can increase its selling prices by the amount of the cost increases, the gross profit (sales minus the cost of goods sold), net income, taxable income, income taxes, and inventory will remain nearly the same.

FIFO (first-in, first out) results in the older/lower costs flowing from inventory to the cost of goods sold. The recent/higher costs are added to inventory. Compared to LIFO, inventory will be larger and the cost of goods sold will be smaller. If selling prices are increased by the full amount of the cost increases, FIFO will report more gross profit, net income, taxable income, income tax payments, and inventory than LIFO. The additional profits are referred to as illusory or as phantom profits. To avoid paying income taxes on these phantom profits, many companies have switched from FIFO to LIFO.

As mentioned in the beginning, these are general comments. You should always determine the specific facts for your situation and should consult with a professional accountant and tax adviser.