Enter your opening stock and each purchase with its unit cost, then the units sold. See how the three costing methods change cost of goods sold, closing stock value and profit.
Enter opening stock and purchases in date order (oldest first).
| Layer | Units | Cost / unit | |
|---|---|---|---|
| Method | COGS | Ending stock | Gross profit |
|---|---|---|---|
| FIFO | 3,780.00 | 1,820.00 | 2,620.00 (40.9%) |
| LIFO | 4,240.00 | 1,360.00 | 2,160.00 (33.8%) |
| Weighted average | 3,982.22 | 1,617.78 | 2,417.78 (37.8%) |
Goods available for sale: 450 units costing 5,600.00. Revenue at your price: 6,400.00.
Pyalm Books tracks products with cost and price, real-time stock levels and transfers between stores, with every sale and purchase posting to the ledger.
When purchase prices change, the cost you assign to units sold depends on the method. FIFO assumes the oldest units are sold first, so closing stock carries recent costs. LIFO assumes the newest units are sold first. Weighted average blends all costs into one average. In rising prices FIFO shows the highest profit and LIFO the lowest.
IFRS (and therefore UAE and most international reporting) permits FIFO and weighted average cost but prohibits LIFO under IAS 2. LIFO is allowed under US GAAP. The method must be applied consistently, and a change is an accounting policy change requiring disclosure. Check tax treatment with your adviser.
📖 Read the full guide: FIFO vs LIFO vs Weighted Average: Worked Example
Opening stock + purchases − closing stock = cost of goods sold.
See how many times you sell and replace stock, and days of inventory on hand.
Know exactly when to reorder stock so you never run out.
Turn cost and selling price into margin %, markup %, and net profit.
Periodic: costs are matched to total units sold at the end of the period. Perpetual systems that update after every sale can give different FIFO and average results when purchases and sales interleave.
Units sold can't exceed opening stock plus purchases. Add the missing purchase layer or reduce the units sold.
The COGS calculator uses the simple opening stock + purchases − closing stock formula. This tool shows how the costing method changes that closing stock and COGS.