---
title: "FIFO vs weighted average calculator: compare COGS and ending inventory"
description: "Free FIFO vs weighted average calculator: enter opening stock, purchases and units sold to compare cost of goods sold, ending inventory and gross profit."
canonical: https://ledgeriano.com/tools/fifo-vs-weighted-average-calculator
language: en
publisher: "Ledgeriano"
updated: 2026-11-06
---

# FIFO vs weighted average calculator: compare COGS and ending inventory

> Free FIFO vs weighted average calculator: enter opening stock, purchases and units sold to compare cost of goods sold, ending inventory and gross profit.

FIFO assigns the oldest purchase costs to the units sold, while weighted average uses the average cost of all units available. When prices rise, FIFO gives lower cost of goods sold and higher ending inventory. In the example, selling 400 of 600 units costs 4,400 under FIFO and 4,533 under weighted average.

## FIFO and weighted average formulas

Both methods start from the same cost of goods available for sale. They differ only in how that cost is split between units sold and units left.

```
Cost of goods available: Opening inventory + Purchases
FIFO cost of goods sold: Cost of the oldest layers, used up in order
Weighted average unit cost: Avg = Cost of goods available / Units available
Average cost of goods sold: COGS = Units sold × Avg
Ending inventory (both): Cost of goods available - COGS
```

This calculator uses the periodic weighted average (one average for the period). A perpetual moving average recalculates the average after every purchase, so the result also depends on when each sale happened.

## Worked example: three purchase layers

A shop starts the month with 100 units at 10. It buys 200 units at 11 and then 300 units at 12, so 600 units costing 6,800 are available. It sells 400 units at 20 each.

Under **FIFO** the 400 units sold come from the oldest layers: 100 × 10 + 200 × 11 + 100 × 12 = **4,400**. The 200 units left are valued at the latest cost, 200 × 12 = 2,400. Under **weighted average** the unit cost is 6,800 / 600 = 11.33, so cost of goods sold is 400 × 11.33 = **4,533** and ending inventory is 2,267. FIFO shows 133 more gross profit because costs were rising.

FIFO vs weighted average for the example

| Item | FIFO | Weighted average | Difference |
| --- | --- | --- | --- |
| Cost of goods sold | 4,400 | 4,533 | -133 |
| Ending inventory | 2,400 | 2,267 | 133 |
| Gross profit (sales 8,000) | 3,600 | 3,467 | 133 |

## Assumptions behind the result

- Purchases are listed in the order they arrived; opening stock is the oldest layer.
- Unit costs include everything needed to bring the goods to their location and condition: purchase price, import duties, freight in, less discounts and rebates.
- Weighted average is computed once for the period (periodic method).
- Units sold all left stock within the period, and there were no returns or write-downs.

## Which method is allowed: FIFO, weighted average or LIFO?

Under IFRS, IAS 2 allows FIFO and the weighted average cost formula for interchangeable items, and requires specific identification for items that are not interchangeable. LIFO is not permitted under IFRS.

US GAAP still allows LIFO, which is why some US companies report it. Whatever you choose, use the same cost formula for all inventories of a similar nature and use, and apply it consistently from year to year.

## How the choice affects profit and tax

When purchase prices rise, FIFO reports lower cost of goods sold, higher profit and a higher inventory value on the balance sheet, because the cheapest old units are expensed first. Weighted average smooths the effect. When prices fall, the order reverses.

Over the life of the business the total cost expensed is the same; the methods only change the timing. The difference matters most for businesses with large stock holdings, long holding periods and fast-moving prices.

Effect of each method when prices are rising

| Effect | FIFO | Weighted average |
| --- | --- | --- |
| Cost of goods sold | Lower | In between |
| Gross profit | Higher | In between |
| Ending inventory | Closer to current prices | Blend of old and new prices |
| Volatility of unit cost | Steps with each layer | Smoothed |

## Moving average in a perpetual inventory system

A perpetual system updates stock and cost of goods sold with every movement. The moving weighted average recalculates the unit cost after each receipt: (value on hand + value received) / (units on hand + units received). Each issue is then costed at the current average.

[Ledgeriano](https://ledgeriano.com/features) keeps a perpetual stock ledger per warehouse and supports FIFO, moving weighted average and standard cost, posting a balanced journal entry for every stock document.

## How to compare FIFO and weighted average

1. **List the layers**: Write down opening stock and each purchase in date order, with quantity and unit cost.
2. **Total what was available**: Add the units and the cost of all layers to get cost of goods available for sale.
3. **Cost the sales under FIFO**: Use up the oldest layers first until you reach the number of units sold.
4. **Cost the sales at average**: Divide total cost by total units and multiply by the units sold.
5. **Compare**: Subtract cost of goods sold from cost available to get ending inventory under each method and compare gross profit.

## Frequently asked questions

### Is FIFO or weighted average better?

Neither is better in general. FIFO values ending stock closer to current prices and matches the physical flow of most goods. Weighted average is simpler for bulk or mixed items and smooths cost swings. Choose the one that best reflects how your stock moves and apply it consistently.

### Why does FIFO give a higher profit when prices rise?

Because the older, cheaper units are charged to cost of goods sold first, while the newer, more expensive units stay in ending inventory.

### Can I switch from weighted average to FIFO?

A change of cost formula is a change in accounting policy. Under IFRS (IAS 8) it is allowed only if it gives more reliable and relevant information, and it is applied retrospectively with comparatives restated.

### What is the difference between weighted average and moving average?

Periodic weighted average computes one average cost for the whole period after all purchases. Moving average recalculates the average after each purchase, so sales early in the period are costed at an earlier average.

### Does the method change the number of units in stock?

No. The physical quantity on hand is the same; only the cost assigned to units sold and units remaining changes.

## Sources

- [IFRS Foundation: IAS 2 Inventories (cost formulas, paragraphs 23 to 27)](https://www.ifrs.org/issued-standards/list-of-standards/ias-2-inventories/)
- [IFRS Foundation: IAS 8 Accounting Policies, Changes in Accounting Estimates and Errors](https://www.ifrs.org/issued-standards/list-of-standards/ias-8-accounting-policies-changes-in-accounting-estimates-and-errors/)
