Whether you run a small retail store, manage a warehouse, or handle business accounting, the
FIFO calculator helps you find your Cost of Goods Sold (COGS) and
ending inventory value in seconds — no spreadsheet needed.
On this page, you will find a free FIFO calculator, a plain-English explanation of what FIFO means,
worked examples, the exact formulas you need, a side-by-side FIFO vs. LIFO comparison, tax and
accounting implications, and answers to the most frequently asked questions. Everything is written
to be as clear and useful as possible, whether you are a student, a small business owner, or
an experienced accountant.
1. What Is FIFO? (Simple Definition)
FIFO stands for First In, First Out . It is an inventory valuation
method that assumes the oldest items you purchased are the first ones you sell .
Think of a supermarket stocking milk cartons. The store places older cartons at the front of the
shelf and newer ones at the back. Customers naturally grab the front ones first. That is FIFO in
everyday life — and it is how your accounting should reflect reality.
In accounting, FIFO determines two important numbers:
Cost of Goods Sold (COGS): the total cost of the inventory you have already sold,
calculated using the oldest purchase prices.
Ending Inventory Value: the dollar value of stock still sitting on your shelf,
calculated using the most recent purchase prices.
FIFO is one of the most widely accepted inventory accounting methods globally. It is permitted under
both U.S. GAAP and IFRS (unlike LIFO, which is banned under IFRS).
Quick summary: FIFO = oldest stock sold first. Your COGS uses old prices.
Your ending inventory uses newer prices.
3. How to Use the FIFO Calculator
Our FIFO calculator is designed to be fast and intuitive. Here is exactly what to do:
Enter your inventory purchase batches. For each batch, input the number of
units purchased and the cost per unit. Add as many purchase layers as you need.
Enter the total number of units sold. This is how many items you sold during
the period.
Click "Calculate." The calculator will apply the FIFO method automatically,
working through your purchase layers from oldest to newest.
Review your results. You will see your COGS, ending inventory value, and a
full breakdown by purchase layer.
What You Need Before You Start
A list of every inventory purchase (date, units, cost per unit) in chronological order
Total units sold during the accounting period
Beginning inventory amount (if calculating across multiple periods)
Tips for Accurate Results
Always enter purchases in the exact order they occurred — oldest first.
Do not mix purchase batches that happened on the same day unless they had different costs.
If you received a purchase return, subtract those units from the relevant purchase layer.
For multiple accounting periods, carry the ending inventory forward as the next period's
beginning inventory.
4. Step-by-Step FIFO Example (With Numbers)
Let us walk through a realistic example so you can see exactly how the FIFO method works
from start to finish.
The Scenario
You own a small electronics shop. During Q1, you made three separate inventory purchases
of the same product (wireless headphones):
Inventory Purchases — Q1
Purchase #
Date
Units Purchased
Cost per Unit
Total Cost
1
January 5
50
$40
$2,000
2
February 12
80
$45
$3,600
3
March 20
60
$50
$3,000
Total
190 units
—
$8,600
During Q1, you sold 100 units . Now you need to calculate your COGS and
ending inventory.
Step 1: Identify the Cost of Goods Available for Sale
Cost of Goods Available for Sale = $2,000 + $3,600 + $3,000 = $8,600
Step 2: Apply the FIFO Method to Units Sold
You sold 100 units. Using FIFO, you start with the oldest purchase (January) and work
your way forward:
From Purchase #1 (January): 50 units × $40 = $2,000
(All 50 units from the first batch are used up.)
From Purchase #2 (February): 50 units × $45 = $2,250
(You still need 50 more units, so you take 50 from the February batch.)
COGS = $2,000 + $2,250 = $4,250
Step 3: Calculate Ending Inventory
After selling 100 units, you have 90 units left (190 − 100 = 90). Using the FIFO method,
these are the most recently purchased units:
30 units remaining from Purchase #2 (February) at $45 each = $1,350
60 units from Purchase #3 (March) at $50 each = $3,000
Ending Inventory = $1,350 + $3,000 = $4,350
Step 4: Verify with the Check Formula
COGS + Ending Inventory = Cost of Goods Available for Sale
$4,250 + $4,350 = $8,600 ✓
FIFO Calculation Summary
Item
Amount
Cost of Goods Available for Sale
$8,600
Units Sold
100
COGS (FIFO)
$4,250
Units Remaining
90
Ending Inventory (FIFO)
$4,350
That is the complete FIFO calculation. The FIFO calculator above does all of this
automatically the moment you enter your numbers.
5. Perpetual vs. Periodic FIFO: What Is the Difference?
This is a detail that most other FIFO guides skip entirely — but it matters for your
accounting system.
FIFO can be applied using two different inventory tracking systems:
Perpetual FIFO
Your inventory records are updated every time a sale or purchase occurs .
Each transaction is logged in real time. This is what modern point-of-sale (POS) systems
and inventory management software do.
Best for: Businesses with high transaction volumes (supermarkets, e-commerce)
Gives the most accurate, up-to-date COGS and inventory balance at any moment
Under the perpetual FIFO system, COGS is calculated at the time of each sale using
the oldest available cost layer at that exact moment
Periodic FIFO
Your inventory records are updated at the end of the accounting period
(monthly, quarterly, or annually). You count physical stock at the end and calculate
COGS as the difference.
Best for: Small businesses with manageable transaction volumes
Simpler to implement, but does not give real-time visibility
Under periodic FIFO, you compile all purchases for the period and subtract ending
inventory to find COGS
Does the Choice Affect the Result?
Yes — but only if you make purchases between sales. In most cases,
the final COGS will differ slightly between perpetual and periodic FIFO if costs changed
during the period and you had interleaved buys and sells. For businesses that only make
periodic purchases (like our Q1 example above), the two methods give identical results.
6. FIFO vs. LIFO vs. Weighted Average: Full Comparison
Three main inventory costing methods are commonly used. Here is a complete, side-by-side
comparison so you can choose what works best for your situation.
FIFO vs. LIFO vs. Weighted Average Comparison
Feature
FIFO
LIFO
Weighted Average
Assumption
Oldest stock sold first
Newest stock sold first
All units share an average cost
COGS in rising prices
Lower (uses old, cheaper costs)
Higher (uses new, costlier costs)
Middle ground
Net income in rising prices
Higher (more tax may be due)
Lower (tax advantage)
Moderate
Ending inventory value
Higher (reflects current prices)
Lower (reflects old prices)
Moderate
Balance sheet accuracy
Best (inventory at market value)
Worst (inventory understated)
Good
Allowed under IFRS?
Yes ✓
No ✗
Yes ✓
Allowed under U.S. GAAP?
Yes ✓
Yes ✓
Yes ✓
Complexity
Moderate
Moderate
Simple
Best for
Perishables, electronics, industries with rising costs
Non-perishables in inflationary environments (U.S. only)
Commodities, businesses with many identical units
The Weighted Average Method: How It Differs from FIFO
The weighted average method (also called the average cost method) calculates a single
blended cost per unit across all purchases in the period, then applies that one number
to both COGS and ending inventory. It does not track layers.
Weighted Average Cost per Unit = Total Cost of All Purchases ÷ Total Units Available
Using our earlier headphones example: $8,600 ÷ 190 = $45.26 per unit .
COGS for 100 units would be 100 × $45.26 = $4,526 — noticeably different
from the FIFO result of $4,250.
FIFO gives the most realistic picture of your current inventory value on the balance sheet
because remaining stock is valued at the most recent prices. That is why it is the globally
preferred method.
7. When Should You Use FIFO? Industry Guide
FIFO is the right choice for most businesses, but it is especially well-suited to certain
industries. Here is a practical guide:
Industries Where FIFO Is Almost Always the Best Choice
Food and Beverage: Perishable goods must be sold in order of receipt to
prevent spoilage. FIFO matches accounting to the physical reality of how inventory moves.
Pharmaceuticals: Medications have expiry dates. FIFO ensures oldest stock
moves first, reducing the risk of selling expired products and maintaining regulatory compliance.
Electronics and Technology: Product values fall rapidly as newer models are
released. Selling older units first (and recording their lower original costs) keeps COGS
realistic.
Fashion and Apparel: Seasonal items lose value quickly. FIFO reflects
the actual flow of merchandise through a store.
Retail (General): Most retailers physically sell older stock first, making
FIFO the most accurate accounting match.
Manufacturing: Raw materials purchased earlier are typically used before
newer batches, especially in continuous production.
Any Business That Operates Internationally: Since LIFO is banned under IFRS,
any company with international operations or investors should use FIFO or weighted average.
When FIFO Might Not Be Your First Choice
High inflation environments (U.S. only): Some U.S. companies prefer LIFO
during inflation because higher COGS reduces taxable income. This is only relevant under U.S.
GAAP — LIFO is not permitted internationally.
Commodities with fungible units: For products like oil, grain, or metals,
the weighted average method may be more practical since individual units are identical and
not tracked separately.
8. How Inflation and Deflation Affect FIFO Results
The economic environment significantly changes what your FIFO numbers look like. Understanding
this protects you from being surprised by your own financial statements.
During Inflation (Rising Prices)
When prices are rising, your oldest purchases cost less than your newest ones. Because FIFO
uses those older (cheaper) costs for COGS:
COGS is lower — your sold goods appear cheaper than they actually cost to replace
Gross profit is higher — which looks good on paper
Taxable income is higher — you pay more tax
Ending inventory is higher — because it is valued at current (inflated) prices
Risk of "inventory profit": You may show a profit that is not truly real —
it is just the price increase, not actual business performance. Accountants call this an
"inflationary gain" or "FIFO phantom profit."
During Deflation (Falling Prices)
When prices are falling, FIFO has the opposite effect:
COGS is higher — older units cost more than newer ones
Gross profit is lower
Taxable income is lower — a tax benefit
Ending inventory is lower — valued at the most recent, cheaper prices
The Practical Takeaway
In a stable price environment, the difference between FIFO, LIFO, and weighted average is
minimal. The gap grows wider as prices move more sharply in either direction. Always
consider current economic conditions when choosing your inventory valuation method.
9. FIFO and Taxes: What Every Business Owner Must Know
Your choice of inventory method has a real and direct effect on how much tax you pay. Here
is what you need to understand before filing.
FIFO Generally Results in Higher Taxable Income During Inflation
Because FIFO uses lower, older costs for COGS, your gross profit — and therefore your
taxable income — is higher than it would be under LIFO during inflationary periods. This
means you pay more income tax in the short term.
FIFO Can Be Beneficial in Deflationary or Stable Markets
When prices are stable or falling, FIFO's tax effect is neutral or even slightly favorable.
In deflationary periods, FIFO produces a higher COGS (older units cost more), reducing
taxable income.
You Cannot Switch Methods Every Year
The IRS (and most tax authorities worldwide) requires consistency . Once
you choose FIFO, you must apply it consistently from year to year. Switching methods
requires formal approval and may trigger a tax adjustment in the year of the switch.
Always consult a qualified accountant before changing your inventory method.
FIFO for Capital Gains Tax on Investments
FIFO is also the default method used by the IRS for calculating capital gains
on stock and securities sales (see Section 13 for more on this). When you sell shares without
specifying which lot you are selling, the IRS assumes you sold the oldest shares first.
International Tax Considerations
If your business operates across borders, keep in mind that LIFO is not permitted
under International Financial Reporting Standards (IFRS). This means any multinational company
or any business reporting under IFRS effectively has no choice — FIFO or weighted average is
what you must use. FIFO is therefore the safest and most internationally compatible method.
10. How FIFO Affects Financial Ratios
Your choice of inventory method does not just affect taxes — it flows through your entire
set of financial statements and changes the key ratios that lenders, investors, and analysts
use to evaluate your business.
Impact of FIFO on Key Financial Ratios (Rising Prices)
Financial Ratio
FIFO Effect
Why It Matters
Gross Profit Margin
Higher
Lower COGS = more apparent profitability. Looks better to investors.
Net Profit Margin
Higher (before tax adjustment)
Higher earnings reported, but more tax is owed.
Current Ratio
Higher
Inventory is valued at current (higher) prices, boosting current assets.
Inventory Turnover Ratio
Lower
Higher ending inventory value reduces the turnover ratio. Can make inventory management appear slower.
Return on Assets (ROA)
Higher
Higher inventory value increases total assets, but higher net income has a stronger effect.
Debt-to-Equity Ratio
Lower
Higher retained earnings (from higher profit) increase equity, improving this ratio.
The key takeaway: FIFO makes your business look more profitable and financially
stronger on paper during inflation , but comes with a higher tax bill. When
comparing businesses in the same industry, always check which inventory method each
company uses before drawing conclusions from financial ratios.
11. FIFO Under IFRS vs. GAAP (International Accounting Rules)
If you deal with investors, apply for bank financing, or have international operations,
you need to understand which accounting standard applies to you.
U.S. GAAP (Generally Accepted Accounting Principles)
Permits FIFO, LIFO, and the weighted average method.
Companies must apply the chosen method consistently.
Disclosures are required if a company switches methods.
Used primarily by U.S.-based public companies and many private companies.
IFRS (International Financial Reporting Standards)
LIFO is prohibited. IFRS only allows FIFO and the weighted average method.
FIFO is the most widely used method under IFRS globally.
Required for public companies in over 140 countries, including the EU, UK, Australia,
Canada, and most of Asia.
If your business is listed on a foreign exchange or raises capital internationally,
IFRS rules almost certainly apply.
Why This Matters for Your Business
If you currently use LIFO and want to expand internationally, attract foreign investors,
or list on a foreign stock exchange, you will need to convert to FIFO or weighted average.
This conversion can result in significant one-time tax liabilities and balance sheet changes.
Plan ahead and consult a certified public accountant or IFRS specialist before making the switch.
12. Five Common FIFO Mistakes (and How to Avoid Them)
Even experienced business owners make these errors when applying the FIFO method. Learn them
now so you do not have to learn them the hard way.
Not Recording Purchases in Chronological Order
FIFO depends entirely on knowing which goods arrived first. If you mix up the dates or
enter purchases out of sequence, your entire calculation is wrong. Always record purchase
dates accurately — this is non-negotiable.
Ignoring Purchase Returns and Damaged Goods
If you return goods to a supplier or write off damaged inventory, you must adjust the
relevant purchase layer. Many people forget this step, which overstates both their
available inventory and their COGS.
Confusing Units with Dollar Values
FIFO tracks both the number of units and the cost per unit for each batch. A common
error is entering the total batch cost instead of the per-unit cost — or vice versa.
Double-check your inputs every time.
Switching Methods Mid-Year Without Disclosure
Changing from FIFO to LIFO (or any other method) in the middle of a financial year
without proper disclosure violates accounting standards and can trigger IRS penalties.
Method changes require a formal accounting policy note and, in the U.S., IRS Form 970.
Using FIFO for Physical Stock But a Different Method for Accounting
Your physical stock management and your accounting method do not have to match. However,
if you are physically rotating stock using a FIFO system in your warehouse but your
accountant is using weighted average for the books, your financial statements will not
reflect operational reality. Align your physical and accounting practices wherever possible.
13. FIFO for Stocks and Investments
FIFO is not just for physical inventory. The IRS uses FIFO as the default method
for calculating capital gains on securities — and understanding this can affect how
much tax you pay when you sell shares, ETFs, mutual funds, or cryptocurrency.
How FIFO Works for Investments
If you bought shares of the same company at different times and different prices (called
"lots"), and then you sell some shares, the IRS assumes — unless you instruct otherwise —
that you sold the oldest shares first .
Investment FIFO Example
Imagine you own shares of a company purchased in three lots:
Investment Purchase History
Purchase Date
Shares
Cost per Share
Total Cost
January 2022
100
$20
$2,000
June 2022
100
$30
$3,000
January 2023
100
$40
$4,000
You sell 100 shares in March 2023 at $50 each ($5,000 total). Using FIFO, the IRS
assigns these as the January 2022 lot (cost basis: $2,000).
Capital gain (FIFO) = $5,000 − $2,000 = $3,000
Because those January 2022 shares are over one year old, this qualifies as a
long-term capital gain , taxed at a lower rate (0%, 15%, or 20% depending
on your income) rather than ordinary income rates.
You Can Override FIFO for Investments
Unlike inventory accounting (where you must stick with your chosen method), the IRS allows
investors to specify which lot they are selling at the time of sale. This
is called the "specific identification method." If you specify the highest-cost lot, you
can minimize your capital gain — or even create a capital loss if the shares in that lot
are now worth less than you paid.
Talk to your broker or a tax professional about how to specify your lots before you sell.
Many online brokerage platforms allow you to set your default cost basis method.
FIFO and Cryptocurrency
The IRS treats cryptocurrency as property, not currency. This means the same capital gains
rules — including FIFO as the default lot selection method — apply to Bitcoin, Ethereum,
and other digital assets. Crypto tax software typically applies FIFO by default unless
you manually select a different method.
14. Frequently Asked Questions (FAQ)
What does FIFO stand for?
FIFO stands for First In, First Out. It is an inventory costing method that assumes the
oldest units purchased are the first ones sold.
What is the FIFO method used for?
FIFO is used to calculate the Cost of Goods Sold (COGS) on the income statement and the
ending inventory value on the balance sheet. It is also used as the default method for
capital gains calculations on securities and cryptocurrency.
Is FIFO better than LIFO?
It depends on your goals and location. FIFO produces a more accurate balance sheet (inventory
closer to current market value) and is accepted globally under IFRS. LIFO can reduce taxable
income during inflation, but it is banned under IFRS and only permitted under U.S. GAAP.
FIFO is the better choice for most businesses, especially those with international operations.
How do I calculate ending inventory using FIFO?
Ending inventory under FIFO = (Beginning Inventory + Purchases) − COGS. In practice, this
means your remaining units are valued at the most recent purchase prices, since you consumed
the oldest ones first.
Can I switch from FIFO to another method?
Yes, but not freely. In the U.S., you need IRS approval to change inventory methods (using
Form 3115). The change typically applies from the beginning of the year it is approved. There
may be a catch-up adjustment and potential tax consequences. Always consult a CPA before switching.
Does FIFO assume I physically sell the oldest stock first?
No. FIFO is an accounting assumption, not a physical requirement. Your warehouse can manage
stock in any order it likes. FIFO simply tells your accountant which costs to assign to sales
for financial reporting purposes. That said, physical FIFO stock rotation is best practice
for perishables.
What happens to FIFO during inflation?
During inflation, FIFO produces lower COGS (because it uses older, cheaper costs), higher
gross profit, higher taxable income, and higher ending inventory values. Your business may
appear more profitable than it truly is — this is called "phantom profit" or "inflationary gain."
Is FIFO allowed under IFRS?
Yes. FIFO is permitted under both IFRS and U.S. GAAP. It is, in fact, the only cost flow
assumption permitted under IFRS that is also permitted under U.S. GAAP. LIFO is not permitted
under IFRS at all.
How does FIFO affect my gross profit?
During rising prices, FIFO results in lower COGS, which means higher gross profit. During
falling prices, it is the opposite — FIFO produces higher COGS and lower gross profit.
What is the difference between FIFO and specific identification?
Specific identification tracks the exact cost of each individual unit and assigns that specific
cost when the unit is sold. This is most practical for high-value, low-volume items like jewelry,
cars, or real estate. FIFO uses a layer-based approach and does not require tracking individual units.
Can I use FIFO for my cryptocurrency taxes?
Yes. In the U.S., the IRS uses FIFO as the default cost basis method for cryptocurrency.
You can elect a different method (such as specific identification) if you properly document
which lots you are selling at the time of each transaction. Crypto tax software can automate this.
What is "FIFO phantom profit"?
Phantom profit (also called inflationary gain) is the portion of your reported profit under
FIFO that comes from price increases rather than real business activity. For example, if you
bought goods for $10 and they now cost $15 to replace, your $10 COGS creates a $5 apparent
gain that you will need to spend just to restock. That $5 is phantom profit — it looks real on
paper but is needed to keep the business running.
15. Conclusion: Why the FIFO Calculator Is Your Best Friend in Inventory Accounting
The FIFO method is far more than an accounting technicality. It directly affects your
business's reported profit, your tax bill, your balance sheet strength, and how investors
and lenders perceive your company. Used correctly, FIFO gives you the most accurate and
internationally accepted picture of what your inventory is actually worth.
Here is a quick recap of everything you need to remember:
FIFO assumes the oldest inventory is sold first .
COGS is calculated using the oldest purchase prices ; ending inventory uses the newest.
FIFO is permitted under both IFRS and U.S. GAAP — LIFO is not permitted under IFRS.
During inflation , FIFO produces higher profits but also a higher tax bill.
FIFO is also the IRS default for calculating capital gains on stocks and crypto.
Always enter purchases in chronological order to get accurate results.
Use the perpetual system if you need real-time accuracy; the periodic system for simplicity.
FIFO boosts your current ratio and gross profit margin, making your business look stronger to creditors.
Use the FIFO calculator at the top of this page to get your COGS and ending inventory in
seconds. If you have a complex scenario — multiple products, partial returns, or multi-period
calculations — feel free to work through the step-by-step example in Section 4 as your template.
Accurate inventory accounting is not just about compliance. It is about understanding your
true costs so you can price your products correctly, manage your cash flow, and build a
business that grows on solid ground.