To calculate sales revenue and gross profit using FIFO, multiply units sold by their selling prices to get revenue, assign costs to those sold units by working through your inventory purchases from oldest to newest to get cost of goods sold, then subtract COGS from revenue. FIFO — first in, first out — only changes the cost side of the equation; revenue is calculated the same way regardless of inventory method. The IRS accepts FIFO as a method that clearly reflects income, and it’s also accepted under Generally Accepted Accounting Principles.
What You Need Before You Start
FIFO calculations rely on a detailed inventory ledger that tracks every purchase as a separate batch, sometimes called a layer. Each layer records three things: the date you bought the goods, the number of units in that shipment, and the per-unit cost. These layers are the backbone of the method, because FIFO assigns costs in the order you acquired the inventory. If your supplier raised prices between orders, each layer carries a different cost, and mixing them up will distort your numbers.
You also need complete sales records for the period: how many units you sold and the price on each transaction. Keep purchase orders, supplier invoices, and shipping receipts organized chronologically. The IRS expects this level of detail when verifying that taxable income is accurate, and reconstructing it after the fact is far harder than maintaining it in real time.1Office of the Law Revision Counsel. 26 U.S.C. 471 – General Rule for Inventories
Step 1: Total Up Sales Revenue
Sales revenue is the simpler half. For each sale during the period, multiply units sold by the price your customer paid, then add everything together. If you sold 200 widgets at $25 each and 150 widgets at $28 each, your total sales revenue is $9,200 (200 × $25 + 150 × $28). Revenue reflects the cash or credit you generated before any costs. FIFO does not change this figure.
Step 2: Calculate COGS by Working Through Your Oldest Layers First
This is where the method earns its name. Assign costs to units sold by pulling from your purchase layers oldest first, exhausting each layer before moving to the next.
A Worked Example
Suppose you sold 350 units during the quarter, and your purchase history looks like this:
- January 5: 100 units at $10 each ($1,000 total)
- February 12: 150 units at $12 each ($1,800 total)
- March 20: 200 units at $14 each ($2,800 total)
Start with the January layer. It covers 100 of the 350 units at $10 each, so $1,000 of cost. Move to February and use all 150 units at $12 each, adding $1,800. You have now assigned costs to 250 units, with 100 left. Those 100 come from the March layer at $14 each, adding $1,400. Your total COGS is $1,000 + $1,800 + $1,400 = $4,200.
What’s Left Is Ending Inventory
The March layer had 200 units, but you only used 100 for COGS. The remaining 100 units at $14 each sit on your balance sheet as ending inventory worth $1,400. Under FIFO, ending inventory always reflects your most recent purchase prices, which generally makes the balance sheet a more realistic snapshot of what your stock is worth today. You can double-check the number with the standard formula: beginning inventory plus purchases minus COGS equals ending inventory.
Step 3: Subtract COGS From Revenue to Get Gross Profit
Subtract COGS from total sales revenue. Using the example above, revenue of $9,200 minus COGS of $4,200 gives gross profit of $5,000. This figure appears near the top of your income statement and shows what’s left after covering the direct cost of the products you sold. It does not account for rent, payroll, marketing, or other overhead, so it is not your bottom-line profit, but it is the clearest measure of how much margin your inventory is generating.2Internal Revenue Service. Publication 538 (01/2022), Accounting Periods and Methods
Periodic and Perpetual Systems Give the Same FIFO Result
Businesses track inventory using one of two systems, and the choice affects when you run the calculation but not the final numbers under FIFO.
Under a periodic system, you calculate COGS once at the end of the accounting period. Sales are recorded during the period without adjusting the inventory account. At period-end, you count what’s left and use beginning inventory plus purchases minus ending inventory to back into COGS.
Under a perpetual system, the inventory account updates with every sale in real time. Each time a unit leaves the warehouse, the system pulls a cost from the oldest available layer and debits COGS immediately.
FIFO produces identical COGS and ending inventory figures under both systems because you are always pulling from the oldest costs first. That is not true for LIFO or weighted average, where timing can change the result. If you run modern inventory software on a perpetual system, the FIFO layers update automatically with each sale. On a periodic system, you work through the layer-by-layer calculation manually at the close of each period.
When FIFO Cost Is Not What You Report
FIFO gives you the cost of your ending inventory, but that cost is not always what appears on your financial statements. Under GAAP, businesses using FIFO must compare inventory cost to net realizable value — the estimated selling price minus any costs to complete and sell the goods. If net realizable value drops below cost, write the inventory down to the lower figure and recognize the loss on your income statement immediately. Once written down under U.S. rules, you generally cannot reverse the write-down even if the value recovers later.
This matters most for seasonal goods, perishable products, and technology that depreciates quickly. A retailer sitting on last season’s merchandise at $14 per unit under FIFO may need to mark it down to $9 if that’s all the market will pay. The $5 per-unit loss hits the income statement in the period the decline is recognized, not the period the goods are eventually sold.
Where the COGS Number Goes on Your Tax Return
How you report the COGS figure depends on your business structure. Sole proprietors and single-member LLCs report it directly on Part III of Schedule C (Form 1040), which includes lines for beginning inventory, purchases, and ending inventory. Line 33 asks you to identify the inventory valuation method you used.3Internal Revenue Service. Instructions for Schedule C (Form 1040)
Corporations, S corporations, and partnerships use Form 1125-A (Cost of Goods Sold), attached to the entity’s income tax return. The form follows the same logic: beginning inventory on Line 1, purchases in the middle, ending inventory on Line 7, and COGS on Line 8. Line 9 asks you to check a box indicating your valuation method.4IRS.gov. Form 1125-A Cost of Goods Sold The numbers flow from the same FIFO calculation described above.
Why the FIFO Number Is Usually Higher During Inflation
FIFO has a tax consequence that catches many business owners off guard. When suppliers keep raising prices, FIFO assigns the oldest and cheapest costs to the goods you sold. That produces a lower COGS, which means higher gross profit, higher taxable income, and a larger tax bill. Inventory on your shelves looks strong on the balance sheet because it is valued at recent, higher prices, but you are paying tax on profit that partly reflects inflation rather than genuine operational improvement.
Consider a simple scenario. You buy a product for $100 in January and an identical product for $110 in March. You sell one unit for $132. Under FIFO, COGS is $100 (the January cost), so pre-tax profit is $32. Under LIFO, COGS would be $110 and pre-tax profit would be $22. At a 21% corporate tax rate, FIFO produces $6.72 in federal tax versus $4.62 under LIFO. The $2.10 difference is small on one unit, but multiplied across thousands of units and several years of steady price increases, FIFO can meaningfully increase what you owe.
Businesses using LIFO for tax purposes must also use LIFO on their financial statements. FIFO has no such conformity requirement, so you can use FIFO for taxes and any accepted method for internal reporting, which gives you more flexibility in how you present results to lenders or investors.