FIFO (first in, first out) assumes the oldest stock is sold first, so cost of goods sold uses the oldest purchase prices. Weighted average blends every purchase into one average cost per unit. When prices are stable the two give the same answer. When prices move, they give different profit and different closing stock values.
The number you choose flows into your cost of goods sold, gross profit, closing stock on the balance sheet and, in turn, the tax you pay. If you want to try your own figures straight away, use our free inventory valuation calculator, which runs both methods side by side.
FIFO vs Weighted Average at a Glance
| FIFO | Weighted average | |
|---|---|---|
| Idea | Oldest stock is sold first | Every unit carries the same blended cost |
| Cost of goods sold uses | Oldest purchase prices | The average price of all units available |
| Closing stock is valued at | Latest purchase prices | The average price |
| When prices rise | Lower COGS, higher profit | COGS and profit in the middle |
| When prices fall | Higher COGS, lower profit | COGS and profit in the middle |
| Effort | Track each purchase lot | Recalculate one average |
| Best for | Perishables, products that sell in order of arrival | Fungible goods mixed together, such as grain, fuel or chemicals |
Worked Example
A shop has the following stock of one product during the month:
| Date | Event | Units | Cost per unit | Value |
|---|---|---|---|---|
| 1 Oct | Opening stock | 100 | ₹50 | ₹5,000 |
| 8 Oct | Purchase | 200 | ₹55 | ₹11,000 |
| 20 Oct | Purchase | 150 | ₹60 | ₹9,000 |
| Available | 450 | ₹25,000 |
During the month the shop sells 300 units.
FIFO
The 300 units sold come from the oldest lots first:
- 100 units × ₹50 = ₹5,000
- 200 units × ₹55 = ₹11,000
- Cost of goods sold = ₹16,000
- Closing stock: 150 units × ₹60 = ₹9,000
Weighted average
Average cost = ₹25,000 ÷ 450 units = ₹55.56 per unit.
- Cost of goods sold = 300 × ₹55.56 = ₹16,667
- Closing stock = 150 × ₹55.56 = ₹8,333
Compare
| FIFO | Weighted average | |
|---|---|---|
| Cost of goods sold | ₹16,000 | ₹16,667 |
| Closing stock | ₹9,000 | ₹8,333 |
| Gross profit if sales were ₹24,000 | ₹8,000 | ₹7,333 |
Costs were rising, so FIFO charged the cheaper, older stock to the month's sales and showed ₹667 more profit. The total of cost of goods sold and closing stock is ₹25,000 under both methods; only the split between the two changes.
Which Method Should You Use?
- Choose FIFO if your goods really do sell in order of arrival, such as food, medicines or anything that expires. It also reflects current replacement cost on the balance sheet.
- Choose weighted average if units are interchangeable and mixed together, or if you want a simple method that smooths price swings.
- Whichever you choose, apply it consistently to the same class of stock from period to period. Changing methods only to move profit around is not acceptable.
What About LIFO?
LIFO (last in, first out) assigns the newest costs to sales first. It is not permitted under IFRS or Ind AS 2, and Indian accounting standard AS 2 lists FIFO and weighted average as the accepted cost formulas. Check the rules in your own country, since some jurisdictions, such as the US, allow it for tax.
Periodic vs Perpetual Weighted Average
The example above uses the periodic method: one average calculated at the end of the period. In a perpetual system the average is recalculated after every purchase, which is more accurate during the month and gives slightly different numbers. Accounting software does this automatically.
How Inventory Valuation Affects Your Accounts
- Cost of goods sold on the profit and loss statement
- Closing stock on the balance sheet
- Gross margin, and therefore tax on profit
- Ratios such as inventory turnover. See our guide to days in inventory and inventory turnover and the post on beginning and ending inventory calculation.
Frequently Asked Questions
Does FIFO always show higher profit?
Only when purchase prices are rising. When they fall, FIFO shows lower profit than weighted average.
Is weighted average allowed for tax in India?
Accounting standards accept it, but tax treatment can depend on the circumstances. Speak to your accountant about your case.
What is the formula for weighted average cost?
Total cost of goods available for sale divided by total units available for sale.
Can I use different methods for different products?
Yes, as long as each class of similar inventory uses the same method every period.
Let the Software Do the Costing
Tracking lots by hand gets tedious beyond a handful of products. myBooksAI values stock automatically as you record purchases and sales, so your cost of goods sold and closing stock stay current. To check a single product quickly, use the free inventory valuation calculator.
See how myBooks can help
Automate bookkeeping, invoicing, and bank reconciliation with myBooks.
Explore myBooks →


