AppCrib
Everyday Tools

FIFO vs LIFO vs Weighted Average: Why Inventory Method Changes Your COGS

Domain knowledge·Published by AppCrib··
CogslyCOGS, gross profit, and margin in one calculation.

A boutique buys 100 candles in January at $4 each, another 100 in February at $5, and another 100 in March at $6. Total inventory cost: $1,500. By the end of Q1 they have sold 200 candles, leaving 100 in stock. What was the cost of goods sold for those 200 candles?

The math says $1,500 minus the value of remaining inventory, but the value of remaining inventory depends on which 100 candles you decide are still on the shelf. If the leftovers are the March batch, they're worth $600 and COGS is $900. If the leftovers are the January batch, they're worth $400 and COGS is $1,100. Same purchases, same sales, same physical candles. A $200 swing in COGS based purely on which valuation rule the seller is using.

The rule is called an inventory method, and it is the largest hidden variable in any cost of goods sold calculation. There are three commonly used options: FIFO, LIFO, and weighted average. They all start from the same purchase invoices and they all produce different numbers.

FIFO: Oldest Costs Out First

First-in, first-out assumes the first units bought are the first units sold. Whether that matches what physically happened on your shelves is irrelevant. It's an accounting election, not a logistics description.

Applied to the candle example: 200 sold means the first 100 (at $4) and the next 100 (at $5) leave inventory. COGS comes to $400 plus $500, or $900. The remaining 100 units, valued at $6 each, sit on the balance sheet at $600.

FIFO is the most common inventory method in the US and, alongside weighted average, the only method IFRS permits. In periods of rising prices, which describes most periods due to general inflation, FIFO produces lower COGS, higher reported profit, and a higher inventory valuation than LIFO. The IRS doesn't require any specific method, but does require consistency once one is chosen. Switching methods later isn't a per-period choice; it's a formal change in accounting method that requires regulatory approval.

LIFO: Newest Costs Out First

Last-in, first-out assumes the most recent units bought are the first units sold. In the candle example, the 200 sold draw from the March batch ($6 each) and the February batch ($5 each). COGS adds up to $600 plus $500, or $1,100. The remaining 100 units sit on the balance sheet at $400.

LIFO is allowed under US GAAP but prohibited under IFRS, which is why companies that report in both jurisdictions usually pick FIFO or weighted average to avoid maintaining two parallel inventory ledgers. There is also the LIFO conformity rule, codified at IRC §472(c): if you use LIFO for tax purposes, you must also use it for financial reporting. You can't pick the rule that produces lower taxable income for the IRS and a different rule that produces higher reported earnings for investors. The two have to match.

In an inflationary environment, LIFO produces higher COGS, lower reported profit, lower taxable income, and a lower inventory valuation. Sellers who carry inventory through periods of rising prices sometimes elect LIFO specifically because of the tax shield. The trade-off is that the balance sheet inventory number becomes increasingly disconnected from current replacement cost. The accounting gap between LIFO-valued inventory and what the same inventory would be worth under FIFO is called the LIFO reserve. Large industrial companies often disclose it as a line item in their annual reports, and the figures can run into the hundreds of millions for companies that adopted LIFO in the 1970s.

Weighted Average: Smooth It Out

Weighted average takes the total dollar cost of inventory available for sale and divides by total units. Applied to the candles: $1,500 total cost, 300 total units, $5 average per unit. COGS for the 200 sold comes to $1,000. The remaining 100 units sit at $500.

Weighted average lands between FIFO and LIFO in COGS terms and is the standard method for fungible inventory like grain, fuel, fasteners, or any commodity where individual unit identity doesn't matter. Both US GAAP and IFRS permit it.

Side by side, the three methods produce the following from the candle example:

MethodCOGS for 200 units soldEnding inventory (100 units)Gross profit at $10/unit revenue
FIFO$900$600$1,100
LIFO$1,100$400$900
Weighted Average$1,000$500$1,000

Same physical inventory. Same sales. A $200 spread in COGS, a $200 spread in gross profit, all from an election made on a tax form years before any of the sales happened.

Specific Identification, and Why It Almost Never Works

A fourth method exists: specific identification, where every unit is tracked individually and COGS reflects the actual purchase price of the actual units sold. This is the only method that maps inventory accounting to physical reality.

It works for cars, fine art, custom jewelry, anything with a unique serial number or one-of-a-kind status. It doesn't work for retailers selling fungible product. Tracking 10,000 identical t-shirts by individual purchase batch is operationally absurd unless software does the lift, and even then most inventory systems default to weighted average because the accounting outcome is functionally similar for fungible goods.

The IRS allows specific identification under Treasury Regulation §1.471-2(d), but it expects evidence that the inventory genuinely has unit-level distinctness. For most ecommerce and retail, specific identification fails that test on the first audit question.

The Lock-In That Follows the Election

Picking an inventory method isn't a per-period decision. The IRS requires consistency, and once a method is elected, switching requires filing Form 3115 (Application for Change in Accounting Method) and getting approval from the Commissioner. The form itself isn't difficult to fill out, but the approval window can stretch past a year, and the change carries prior-period adjustments to true up the books for the new method.

LIFO carries an additional restriction. Once elected, a switch away from LIFO triggers recognition of the entire accumulated LIFO reserve as taxable income in the year of change. Companies that adopted LIFO decades ago and have ridden out long periods of inflation can carry reserves running into nine figures, which makes any reversion to FIFO a tax event of meaningful scale. That's why most LIFO elections, once made, are functionally permanent.

For small sellers under the IRC §471(c) gross-receipts threshold, none of this rigidity applies. The Tax Cuts and Jobs Act of 2017 raised the small-taxpayer threshold from $1 million to $25 million in average annual gross receipts, and inflation indexing has carried it past $30 million for tax years 2024 forward. Businesses under that ceiling can follow their book accounting method or treat inventory as non-incidental materials and supplies, which means no formal FIFO/LIFO/weighted-average election is required at all. That's the regime most Shopify and Etsy sellers operate under, whether or not they've ever heard the term.

What This Means for a Free COGS Calculator

A free COGS calculator that takes beginning inventory, purchases, direct expenses, and ending inventory as inputs produces a single number. That number is method-neutral in the sense that the formula

COGS = (Beginning Inventory + Purchases + Direct Expenses) − Ending Inventory

works for FIFO, LIFO, and weighted average without modification. What changes between methods isn't the formula. It's the value assigned to ending inventory, which is computed outside the calculator using whichever method the seller has adopted.

In practice, most small sellers do their ending inventory count at cost based on the most recent supplier invoices. That's FIFO whether they call it that or not. The §471(c) small-business exemption means that for most operators in that bucket, the formal method label doesn't matter. What matters is consistency from period to period and reasonable documentation of how the ending inventory number was reached. An auditor who shows up will care that the count was reasonable and that the same approach was used last year and the year before. The auditor isn't generally going to care which textbook the methodology came out of.

If you want to see what COGS, gross profit, and margin come out to under the FIFO assumption most small sellers default to, Cogsly takes the four inputs and produces all three values in a single pass. The method election sits with the operator. The arithmetic sits with the calculator.

Cogsly
COGS, gross profit, and margin in one calculation.
Try Cogsly