FIFO Gross Profit Calculator
Calculate cost of goods sold, ending inventory, revenue, and gross profit using the first-in, first-out inventory method. Enter your beginning inventory, purchases, and sales data to estimate gross profit under FIFO.
FIFO assumes the oldest inventory costs are assigned to the first units sold.
Total Available Units
450
Total Inventory Cost
$5,600.00
FIFO COGS
$3,400.00
Gross Profit
$3,200.00
Results will appear here after you calculate. This calculator allocates sold units to the oldest inventory layers first, then computes revenue, cost of goods sold, ending inventory, and gross profit.
How to Calculate the Gross Profit Using FIFO
Gross profit is one of the most important numbers in business finance because it shows how much money remains from sales after subtracting the direct cost of the inventory sold. When a company tracks inventory, the method it uses to assign cost to sold units can materially change cost of goods sold, ending inventory, and profit. One of the most common methods is FIFO, which stands for first in, first out. Under FIFO, the oldest costs in inventory are assumed to be sold first, while the newest costs remain in ending inventory. If your input prices have been rising over time, FIFO often produces lower cost of goods sold and higher gross profit than methods such as LIFO or weighted average.
To understand how to calculate the gross profit using FIFO, you need to break the process into a few simple accounting steps. First, determine how many units you had available for sale during the period. Second, identify the cost layers of those units, starting with beginning inventory and then each purchase batch in chronological order. Third, match the units sold to the oldest available cost layers. That gives you cost of goods sold under FIFO. Fourth, calculate sales revenue by multiplying units sold by the selling price. Finally, subtract FIFO cost of goods sold from revenue to get gross profit. The formula is straightforward, but the inventory layer assignment is where the real accounting work happens.
The Core FIFO Gross Profit Formula
The high-level equation looks like this:
- Revenue = Units sold × Selling price per unit
- FIFO cost of goods sold = Cost of the oldest inventory layers used to satisfy sales
- Gross profit = Revenue – FIFO cost of goods sold
Suppose a retailer starts with 100 units at $10 each, then buys 150 units at $12 each, then buys 200 units at $14 each. If the retailer sells 300 units at $22 each, FIFO assumes the first 100 units sold came from the beginning inventory, the next 150 units came from purchase batch 1, and the final 50 units came from purchase batch 2. The FIFO cost of goods sold would be:
- 100 × $10 = $1,000
- 150 × $12 = $1,800
- 50 × $14 = $700
Total FIFO COGS = $3,500. Revenue = 300 × $22 = $6,600. Therefore, gross profit = $6,600 – $3,500 = $3,100. The ending inventory would be the 150 unsold units left from the newest layer at $14 each, or $2,100.
Step by Step: How FIFO Works in Practice
To calculate gross profit correctly, you should follow a consistent sequence. Start with beginning inventory because those units represent the oldest costs carried into the current period. Then list all purchases in chronological order. Once you know how many units were sold during the period, allocate those sales against the oldest available units first. Keep subtracting from each layer until the sale quantity has been fully assigned.
Here is the step-by-step process in a practical format:
- List beginning inventory units and cost per unit.
- List each purchase batch by date, units, and unit cost.
- Compute total goods available for sale in units and dollars.
- Determine total units sold during the period.
- Apply FIFO by assigning sold units to the oldest layers first.
- Add the assigned layer costs to calculate FIFO COGS.
- Calculate revenue from selling price and units sold.
- Subtract FIFO COGS from revenue to get gross profit.
- Value any remaining units as ending inventory using the newest costs left unsold.
Why FIFO Often Increases Gross Profit During Inflation
When input costs rise over time, older inventory layers are generally cheaper than newer ones. Under FIFO, those lower historical costs are recognized first in cost of goods sold. Since gross profit equals revenue minus COGS, lower COGS typically increases gross profit. This is one reason FIFO can make a company appear more profitable during inflationary periods. However, it can also result in higher taxable income when tax rules permit the method, because reported profit may be higher.
In contrast, under a method that assigns newer and more expensive units to sales first, cost of goods sold would rise and gross profit would fall. This means managers, investors, and lenders need to understand the inventory accounting policy behind the gross profit figure. Two companies with identical sales volumes and purchase prices can report different gross profits solely because they use different inventory methods.
| Inventory Method | Cost Flow Assumption | Typical Effect in Rising Prices | Gross Profit Impact |
|---|---|---|---|
| FIFO | Oldest costs move to COGS first | Lower COGS, higher ending inventory | Usually higher gross profit |
| LIFO | Newest costs move to COGS first | Higher COGS, lower ending inventory | Usually lower gross profit |
| Weighted Average | Average cost assigned to all units | Smooths cost changes | Usually between FIFO and LIFO |
Real Statistics That Help Explain FIFO Results
Gross profit analysis is not just a bookkeeping exercise. It directly influences pricing, inventory replenishment, lender reporting, and tax planning. According to the U.S. Census Bureau’s Annual Retail Trade Survey, retail and inventory-intensive sectors routinely manage billions of dollars in merchandise, and small cost assignment differences can meaningfully affect reported margins. The Bureau of Labor Statistics also reports regular shifts in producer and consumer price levels, which means the cost of replacing inventory may trend up or down over time. When prices are rising, FIFO can produce a margin result that is materially different from other methods.
| Reference Statistic | Recent Public Data Point | Why It Matters for FIFO Gross Profit |
|---|---|---|
| U.S. CPI inflation | 3.4% for the 12 months ending April 2024 | Rising prices can widen the difference between older inventory costs and newer replacement costs. |
| U.S. PPI final demand inflation | 2.2% for the 12 months ending April 2024 | Producer price changes often feed directly into inventory purchase costs used in FIFO layers. |
| U.S. retail inventories | Hundreds of billions of dollars reported across retail sectors in federal trade data | Even small percentage changes in valuation can translate into large gross profit differences in aggregate. |
These figures are useful because they demonstrate a practical point: inventory costing does not happen in a vacuum. In stable price environments, the difference between methods may be smaller. In volatile price environments, especially when sourcing costs are changing month to month, FIFO can produce noticeably stronger gross profit numbers simply because older, cheaper costs are expensed first.
A Full Worked Example
Imagine a wholesaler with the following inventory activity for one month:
- Beginning inventory: 80 units at $15
- Purchase on May 5: 120 units at $16
- Purchase on May 19: 140 units at $18
- Units sold during May: 250 units
- Selling price: $28 per unit
First, compute total units available: 80 + 120 + 140 = 340 units. Next, assign the 250 units sold using FIFO:
- Use all 80 beginning units at $15 = $1,200
- Use all 120 units from the May 5 purchase at $16 = $1,920
- Use 50 units from the May 19 purchase at $18 = $900
FIFO COGS = $1,200 + $1,920 + $900 = $4,020. Revenue = 250 × $28 = $7,000. Gross profit = $7,000 – $4,020 = $2,980. The ending inventory is 90 units remaining from the newest purchase layer at $18 each, or $1,620.
This example highlights a key benefit of FIFO for analysis: ending inventory on the balance sheet is made up of the most recent costs. In periods of changing prices, that often means FIFO ending inventory is closer to current replacement cost than older methods that leave outdated costs in stock.
Common Mistakes When Calculating FIFO Gross Profit
Even experienced operators make mistakes when building a FIFO calculation manually in a spreadsheet. The most frequent problem is mixing up units and dollars. Another is forgetting to include beginning inventory before applying current-period purchases. Some users also assign all sold units to the most recent purchases by accident, which reverses FIFO into something closer to LIFO. That leads to an incorrect gross profit figure.
- Not reconciling total units available with total units sold and ending units
- Ignoring beginning inventory layers
- Applying the wrong chronological order to purchase batches
- Using sales dollars instead of unit counts for cost assignment
- Forgetting freight-in or other inventoriable costs if your accounting policy includes them
- Confusing gross profit with net profit after operating expenses
How to Interpret Gross Profit After You Calculate It
Once FIFO gross profit has been calculated, the next question is whether it is good, weak, or trending in the wrong direction. Gross profit by itself is helpful, but gross margin often provides deeper context. Gross margin is gross profit divided by revenue. For example, if gross profit is $3,100 on revenue of $6,600, the gross margin is 46.97%. Tracking that percentage over time helps you see whether pricing, purchasing, shrinkage, or supplier cost increases are affecting profitability.
A rising gross profit number does not always mean stronger operating performance. It may simply reflect higher selling prices or the accounting effect of FIFO during inflation. That is why decision makers often compare FIFO gross profit against prior periods, budget expectations, inventory turnover, and replacement cost trends. A company can look profitable under FIFO while still facing margin pressure on future purchases if newer inventory is becoming much more expensive.
When FIFO Is Most Useful
FIFO is especially useful in businesses that sell perishable goods, seasonal merchandise, cosmetics, pharmaceuticals, or products that naturally rotate from older stock to newer stock. It is also favored when management wants ending inventory values that better approximate current market purchase costs. International Financial Reporting Standards generally allow FIFO, and many businesses prefer it because it is conceptually intuitive and aligns with how many warehouses physically manage stock.
If you are using FIFO for financial reporting, consistency matters. Apply the same cost flow rule from period to period unless there is a justified reason to change accounting methods. Consistency improves comparability and makes your trend analysis on gross profit more meaningful.
Authoritative Sources for Inventory and Margin Analysis
For additional guidance and economic context, review the following authoritative resources:
- IRS Publication 538 on accounting periods and methods
- U.S. Bureau of Labor Statistics Consumer Price Index data
- U.S. Census Bureau retail trade and inventory data
Final Takeaway
If you want to know how to calculate the gross profit using FIFO, remember the process in one sentence: determine revenue from units sold, assign cost of goods sold using the oldest inventory layers first, and subtract FIFO COGS from revenue. The result gives you gross profit, while the remaining newest layers become ending inventory. In periods of rising costs, FIFO often leads to lower COGS and higher gross profit than some alternative methods. That makes FIFO both a practical accounting method and an important analytical lens for understanding the profitability of inventory-based businesses.