FIFO Gross Profit: Calculation, Examples & WooCommerce COGS Tracking
You sold 50 units last month. Revenue looked great. But when you subtracted what you actually paid for that inventory, the profit number felt… off. Sound familiar?
For most WooCommerce store owners, the problem isn’t sales.. it’s not knowing the true cost behind each sale. That’s where the FIFO method comes in. FIFO (First In, First Out) is the most widely used inventory valuation method in eCommerce, and when applied correctly, it gives you an accurate picture of your gross profit.. not just your revenue.
In this guide, you’ll get a plain-English explanation of FIFO, a fully worked numerical example with a step-by-step table, a direct comparison with LIFO, and a practical walkthrough of how WooCommerce store owners can automate the entire process without spreadsheets.
Quick Answer: FIFO Gross Profit
FIFO (First In, First Out) assumes your oldest inventory is sold first. To calculate gross profit using FIFO:
- COGS → Cost of your oldest inventory units × units sold
- Gross Profit → Revenue − FIFO-based COGS
- Ending Inventory → Remaining units valued at most recent purchase costs
- In WooCommerce → Use a Cost of Goods plugin to automate FIFO profit tracking per order
Keep reading for a worked numerical example, a FIFO vs LIFO comparison table, and how to set this up in WooCommerce automatically.
FIFO Calculation Example (Step by Step)
Let’s skip the theory for a moment and look at exactly how FIFO works with real numbers. This is the worked example most guides leave out.. and it’s the most important part.
Scenario: You run an online store selling a product. Over three months, you made three separate inventory purchases at different prices (because supplier costs changed). During the same period, you sold 130 units.
Step 1: List Your Inventory Purchases
| Purchase Date | Units Purchased | Unit Cost | Total Cost |
|---|---|---|---|
| January (Batch 1) | 60 units | $10.00 | $600.00 |
| February (Batch 2) | 50 units | $13.00 | $650.00 |
| March (Batch 3) | 40 units | $15.00 | $600.00 |
| Total | 150 units | — | $1,850.00 |
Step 2: Apply the FIFO Method to 130 Units Sold
Under FIFO, the oldest units are sold first. So you work through your batches in order:
| Batch Used | Units Sold from Batch | Unit Cost | COGS from Batch |
|---|---|---|---|
| Batch 1 (January) | 60 units (fully used) | $10.00 | $600.00 |
| Batch 2 (February) | 50 units (fully used) | $13.00 | $650.00 |
| Batch 3 (March) | 20 units (partial) | $15.00 | $300.00 |
| Total COGS | 130 units | — | $1,550.00 |
Step 3: Calculate Ending Inventory
You started with 150 units and sold 130. The remaining 20 units are from Batch 3 (the most recent purchase) at $15.00 each:
Ending Inventory = 20 units × $15.00 = $300.00
Step 4: Calculate Gross Profit
Assume you sold all 130 units at $25.00 each:
- Revenue: 130 × $25.00 = $3,250.00
- FIFO COGS: $1,550.00
- Gross Profit: $3,250.00 − $1,550.00 = $1,700.00
- Gross Profit Margin: ($1,700 ÷ $3,250) × 100 = 52.3%
What Is the FIFO Method? (And Why It Matters for eCommerce)
FIFO stands for First In, First Out. It’s an inventory valuation method that assumes the oldest units in your stock are the first ones sold. This isn’t just an accounting convention.. for most physical product businesses, it reflects reality. Perishable goods, seasonal products, and items with packaging updates all tend to sell in the order they were received.
In accounting terms, FIFO means your Cost of Goods Sold (COGS) is based on the cost of your oldest inventory, while your remaining (ending) inventory is valued at your most recent purchase prices.
The FIFO formula for gross profit is straightforward:
Gross Profit = Revenue − FIFO COGS
FIFO COGS = Cost of oldest units × Number of units sold
How WooCommerce Store Owners Use FIFO to Track Profit
If you’re running a WooCommerce store, FIFO isn’t just an accounting exam concept.. it directly affects how accurately you understand your margins. Every time your supplier raises prices, your COGS changes. If you don’t track which batch each sale came from, you’re guessing at your profit on every order.
Here’s why FIFO matters specifically for eCommerce:
- Supplier prices change frequently. Unlike traditional retail with stable supply chains, eCommerce stores often see fluctuating supplier costs. FIFO ensures your oldest (cheaper) stock is costed first, giving you a cleaner picture of margin evolution over time.
- Profit-per-order visibility. Without FIFO-based COGS tracking, you might see a $1,200 order and assume it’s highly profitable.. but if that order contained expensive recent-batch inventory, your actual margin could be razor-thin.
- Tax accuracy. Using the correct inventory valuation method ensures your reported COGS is accurate for tax purposes, reducing the risk of under- or over-reporting.
How to Set COGS per Product in WooCommerce?
WooCommerce doesn’t include built-in cost-of-goods tracking. To implement FIFO-based profit calculation, you need to add your product costs manually and track them across orders.
The steps below show how this works with a dedicated plugin:
- Add a cost field to each product.
In your product editor, you’ll see a new “Cost of Good” field. Enter the unit cost for each product.. this is the price you paid your supplier, not the selling price.
- Update costs when you restock at a new price.
Each time you receive a new batch at a different cost, update the cost field. The plugin records the change history so you always have a traceable cost archive.
- View profit per order automatically.
Navigate to WooCommerce → Orders. Each order now shows the cost of goods, revenue, and calculated profit.. without any manual calculation.
- Access profit reports by product, date, or category.
Go to WooCommerce → Reports → Cost of Goods to see your gross profit across any time period, broken down by product or category.
⚡ Stop Calculating FIFO Profit Manually
Tracking inventory batches and recalculating COGS every time you restock is time-consuming and error-prone. WPFactory’s Cost of Goods plugin for WooCommerce handles it automatically.. add your product cost once, and it calculates profit across every order in real time.
Used by 15,000+ WooCommerce stores. Tracks COGS, gross profit, shipping costs, payment gateway fees, and more.

FIFO vs LIFO: Which Method Should You Use?
A significant number of people searching for FIFO are trying to decide between FIFO and LIFO (Last In, First Out). Here’s a direct comparison to help you choose:
| Factor | FIFO | LIFO |
|---|---|---|
| How COGS is calculated | Based on the cost of oldest inventory | Based on the cost of most recent inventory |
| Gross profit in inflation | Higher (older, cheaper costs used first) | Lower (newer, more expensive costs used first) |
| Tax implications | Higher taxable income during inflation | Lower taxable income during inflation |
| Ending inventory value | Reflects current market value (recent costs) | Reflects older, potentially outdated costs |
| When to use | Perishables, fashion, electronics, most eCommerce | Non-perishable goods, businesses optimizing for tax reduction |
| International acceptance | Accepted under IFRS and GAAP | Allowed under US GAAP only – not permitted under IFRS |
| WooCommerce compatibility | Fully supported via Cost of Goods plugin | Requires manual cost adjustment per batch |
Bottom line:
For most WooCommerce store owners selling physical products, FIFO is the right choice. It’s internationally accepted, reflects the natural flow of physical inventory, and produces financial statements that more accurately represent your store’s real value.
LIFO is generally only worth considering if you’re in the US, selling non-perishable goods, and specifically trying to reduce taxable income in a high-inflation environment.. and even then, consult an accountant first.
The Four Inventory Valuation Methods: A Quick Overview
FIFO and LIFO aren’t the only options. Here’s a brief overview of all four methods so you can understand where FIFO fits:
- FIFO (First In, First Out): Oldest inventory sold first. Most common for eCommerce and physical product businesses. Accepted globally.
- LIFO (Last In, First Out): Most recent inventory sold first. Allowed only under US GAAP. Can reduce taxable income during inflation but not commonly used in eCommerce.
- Average Cost (Weighted Average): COGS is based on the average cost of all inventory on hand. Simpler to calculate but less precise when costs fluctuate significantly.
- Specific Identification: Each unit is tracked individually with its exact cost. Highly accurate but only practical for low-volume, high-value items like jewellery or custom furniture.
FIFO Gross Profit Calculator
Use this calculator to estimate your gross profit using the FIFO method. Enter your revenue and FIFO-based cost of goods sold to get an instant result.
WPFactory FIFO calculator
FIFO Gross Profit Calculator
Calculate your Cost of Goods Sold using First-In, First-Out inventory method
Related Resources for WooCommerce Store Owners
If you found this guide useful, these related articles cover the next steps in managing your WooCommerce store’s profitability:
- How to Calculate Profit Margin in WooCommerce – A complete guide to gross, operating, and net margin calculations for online stores.
- Best WooCommerce Cost of Goods Plugins – A comparison of the top COGS and profit tracking plugins available for WooCommerce.
- How to Set Up Cost of Goods & Calculate Profits in WooCommerce – A step-by-step setup guide for the WPFactory Cost of Goods plugin.
- Cost of Goods Plugin for WooCommerce – Track COGS, calculate profit per order, and generate profitability reports automatically.
Frequently Asked Questions About FIFO and Gross Profit
1. What is the FIFO method in simple terms?
FIFO (First In, First Out) means the oldest items in your inventory are assumed to be sold first. When calculating your Cost of Goods Sold, you use the cost of the oldest units before moving to newer, more recently purchased stock.
2. How do I calculate gross profit using FIFO?
First, calculate your FIFO COGS by multiplying the cost of your oldest inventory units by the number of units sold (working through batches in order). Then subtract that figure from your total revenue: Gross Profit = Revenue − FIFO COGS.
3. Is FIFO better than LIFO for eCommerce?
For most eCommerce businesses, yes. FIFO reflects the natural physical flow of products (you ship older stock first), is accepted under both IFRS and US GAAP, and produces ending inventory values that more closely match current market prices. LIFO is only permitted under US GAAP and is rarely used in eCommerce contexts.
4. Does WooCommerce calculate FIFO profit automatically?
Not by default. WooCommerce tracks sales and revenue but does not include built-in COGS or profit tracking. To calculate FIFO-based gross profit automatically, you need a plugin such as WPFactory’s Cost of Goods for WooCommerce, which adds a cost field to each product and calculates profit per order in real time.
5. What happens to ending inventory under FIFO?
Under FIFO, ending inventory (the stock you haven’t sold yet) is valued at the cost of your most recently purchased units. This means your balance sheet reflects current market costs, which is generally considered more accurate than LIFO ending inventory valuation.
6. Can I use FIFO if my supplier prices change frequently?
Yes.. in fact, FIFO becomes more important when prices fluctuate. By tracking each batch separately and applying the oldest cost to each sale, you get an accurate picture of your margins even when your supplier raises prices mid-month. A plugin like WPFactory’s Cost of Goods makes this automatic by recording a cost archive every time you update a product’s cost.
7. What is a good gross profit margin for a WooCommerce store?
This varies significantly by industry, but as a general benchmark, a gross profit margin above 40% is considered healthy for most physical product eCommerce stores. Stores selling digital products or software typically target 70–80%+. Use the FIFO calculator above to calculate your current margin and compare it to these benchmarks.