You bought the same product at three different prices and sold part of it. How much is the stock on the shelf worth? What did the goods you sold cost, and what is your gross profit? The answer depends on a cost rule: one of the inventory valuation methods, FIFO, weighted average cost or standard cost. With identical physical movements, the three methods produce three different profits and three different stock values. Total cost does not change; only the way it is split between goods sold and goods still on hand does.
In this guide we work one set of movements by hand under three methods, then look at the effect of rising and falling prices, standard cost variance, how systems keep cost layers, and what negative stock and backdated corrections cost. All figures are illustrative. Which method is acceptable, and the tax and accounting standards that apply, are matters for your financial advisor (certified accountant) and independent auditor.
What Are Inventory Valuation Methods?
Inventory valuation is the rule that decides which unit cost is booked every time stock leaves. There are three common methods.
- FIFO (first in, first out): The cost of the oldest purchase layer goes out first; the stock that remains carries the cost of the newest purchases.
- Weighted average cost: Unit cost is the value of stock on hand plus the value of the new purchase, divided by total units. Recalculated at every receipt it is a moving average; calculated once at period end it is a periodic average.
- Standard cost: The item carries a predetermined fixed unit cost, and the gap between it and actual cost is tracked separately as a variance.
The cost rule is not the same as the physical flow of goods: older stock may leave the shelf first while the cost rule is still an average. For the quantity side, see our guides on how to track inventory and how to do inventory counting.
We recommend reading: Our accounting software service
Why Do Three Methods Give Different Results on the Same Movements?
Because purchase prices change. If prices never moved, all three methods would agree; the difference comes from price gaps between purchase layers. Our example has one product. Amounts are before VAT and illustrative, and the selling price is ₺200 per unit.
| Day | Movement | Units | Unit cost | Amount |
|---|---|---|---|---|
| 1 | Opening stock | 100 | ₺100 | ₺10,000 |
| 5 | Purchase 1 | 200 | ₺110 | ₺22,000 |
| 10 | Sale 1 | 150 | — | — |
| 15 | Purchase 2 | 100 | ₺130 | ₺13,000 |
| 20 | Sale 2 | 180 | — | — |
Total sales are 150 + 180 = 330 units, so revenue is 330 × ₺200 = ₺66,000. Closing stock is 100 + 200 + 100 − 330 = 70 units. Cost available during the period is ₺10,000 + ₺22,000 + ₺13,000 = ₺45,000. Every method splits that ₺45,000 between COGS and closing stock.
How Is FIFO Calculated?
Under FIFO each sale consumes the oldest layer first, so the calculation is just a matter of following the layer order.
| Sale | Layers consumed | COGS |
|---|---|---|
| Sale 1 (150 units) | 100 × ₺100 + 50 × ₺110 | ₺15,500 |
| Sale 2 (180 units) | 150 × ₺110 + 30 × ₺130 | ₺20,400 |
| Total COGS | ₺35,900 |
The remaining 70 units are what is left of the ₺130 layer: 70 × ₺130 = ₺9,100. Check: ₺35,900 + ₺9,100 = ₺45,000. Gross profit = ₺66,000 − ₺35,900 = ₺30,100.
How Is Weighted Average Cost Calculated: Moving or Periodic?
The formula is: new average = (value of stock on hand + value of the new purchase) ÷ (units on hand + new units). A moving average applies it after every receipt, and each sale leaves at the average in force at that moment.
| Event | Units on hand | Stock value | Unit average |
|---|---|---|---|
| Opening | 100 | ₺10,000 | ₺100.00 |
| Purchase 1 (+200 × ₺110) | 300 | ₺32,000 | ₺106.67 |
| Sale 1 (−150) | 150 | ₺16,000 | ₺106.67 |
| Purchase 2 (+100 × ₺130) | 250 | ₺29,000 | ₺116.00 |
| Sale 2 (−180) | 70 | ₺8,120 | ₺116.00 |
Sale 1 costs 150 × ₺106.6667 = ₺16,000 and Sale 2 costs 180 × ₺116 = ₺20,880 (systems keep the average to four decimals; the table shows it rounded). Under the moving average, COGS = ₺16,000 + ₺20,880 = ₺36,880, closing stock is ₺8,120, and gross profit is ₺66,000 − ₺36,880 = ₺29,120.
The periodic average uses one average for the whole period: ₺45,000 ÷ 400 units = ₺112.50. COGS = 330 × ₺112.50 = ₺37,125, closing stock = 70 × ₺112.50 = ₺7,875, and gross profit = ₺66,000 − ₺37,125 = ₺28,875. With a periodic average, cost is known only at period close; with a moving average it is known at every sale, but a late correction forces a recalculation.
How Does Standard Cost Work and How Do You Read the Variance?
Standard costing assigns the item a predetermined unit value, and stock, issues and sales run at that value. The difference from actual purchase cost is tracked as a variance. In the example the standard is ₺115 and opening stock has been revalued to the standard. Variance = standard − actual, so a positive figure means actual cost came in below the standard.
| Item | Calculation | Variance |
|---|---|---|
| Opening stock revaluation | 100 × (₺115 − ₺100) | +₺1,500 |
| Purchase 1 | 200 × (₺115 − ₺110) | +₺1,000 |
| Purchase 2 | 100 × (₺115 − ₺130) | −₺1,500 |
| Total | ₺46,000 − ₺45,000 | +₺1,000 |
At standard, COGS = 330 × ₺115 = ₺37,950 and closing stock = 70 × ₺115 = ₺8,050. If the ₺1,000 total variance is booked as a period expense, net COGS is ₺36,950 and gross profit is ₺29,050. If the variance is instead spread between COGS and stock by units, 330 ÷ 400 × ₺1,000 = ₺825 goes to COGS and ₺175 to stock, giving COGS of ₺37,125 and stock of ₺7,875, the same as the periodic average. Whether the variance is a period expense or an allocated item is an accounting policy; settle it with your financial advisor.
If the standard is reviewed and raised to ₺125, the 70 units on hand produce a revaluation difference of 70 × ₺10 = ₺700. To build a standard from a recipe, see our product cost guide.
How Do the Methods Affect Profit and Stock Value?
In this rising-price example the results are as follows.
| Method | COGS | Gross profit | Gross margin | Closing stock | Unit stock cost |
|---|---|---|---|---|---|
| FIFO | ₺35,900 | ₺30,100 | 45.6% | ₺9,100 | ₺130.00 |
| Moving average | ₺36,880 | ₺29,120 | 44.1% | ₺8,120 | ₺116.00 |
| Periodic average | ₺37,125 | ₺28,875 | 43.8% | ₺7,875 | ₺112.50 |
| Standard (variance expensed) | ₺36,950 | ₺29,050 | 44.0% | ₺8,050 | ₺115.00 |
The profit gap between FIFO and the periodic average is ₺30,100 − ₺28,875 = ₺1,225, or 4.2% of the periodic profit. In every row COGS plus closing stock equals ₺45,000. When the remaining 70 units are sold, the stock value flows into COGS; the gap is a timing difference, and over the product's whole life total profit is the same.
How Does the Effect Change When Prices Rise or Fall?
When purchase prices rise, FIFO gives the highest profit and highest stock value; when they fall, the order reverses. Let us run the same movements with falling prices: opening 100 × ₺100, Purchase 1 200 × ₺90, Purchase 2 100 × ₺80, and the same sales (150 and 180 units at ₺200). Total cost is ₺10,000 + ₺18,000 + ₺8,000 = ₺36,000.
| Method | Calculation summary | COGS | Gross profit | Closing stock |
|---|---|---|---|---|
| FIFO | (100 × 100 + 50 × 90) + (150 × 90 + 30 × 80) | ₺30,400 | ₺35,600 | ₺5,600 |
| Moving average | 150 × 93.33 + 180 × 88.00 | ₺29,840 | ₺36,160 | ₺6,160 |
| Periodic average | 330 × (36,000 ÷ 400 = 90) | ₺29,700 | ₺36,300 | ₺6,300 |
This time FIFO gives the lowest profit: ₺36,300 − ₺35,600 = ₺700. So "FIFO shows more profit" is true only when prices rise. A pricing warning: FIFO sells at old, cheaper cost and so flatters the margin. FIFO's average cost per unit sold is ₺35,900 ÷ 330 = ₺108.79, a unit margin of ₺91.21 = 45.6%. But the goods are now being replenished at ₺130, and the margin at replacement cost is (₺200 − ₺130) ÷ ₺200 = 35.0%, which is 10.6 points lower. Do not leave pricing to the reported margin alone; see our B2B price list guide.
What Is Net Realizable Value?
Net realizable value (NRV) is the expected selling price minus selling costs; the concept is that stock should not be carried above what it can be recovered for. Example: the remaining 70 units cost ₺130 each; if the expected selling price is ₺140 and selling cost ₺15, NRV is ₺125. That signals a shortfall of ₺5 per unit, or 70 × ₺5 = ₺350. How far the concept applies and how it is recorded is for your financial advisor; in a system it can be built as a warning report listing items whose cost exceeds NRV.
How Do Cost Layers Work in a System?
Every stock receipt opens a cost layer in the system: date, quantity, unit cost and remaining quantity. FIFO consumes these layers in order, average methods merge them into one average, and standard costing adds a variance line next to the layer.
Where cost is more than the invoice price, the system must spread extra costs onto the purchase lines. Example: one invoice has 100 units of item A × ₺50 = ₺5,000 and 50 units of item B × ₺100 = ₺5,000, plus ₺600 freight.
| Allocation key | A unit cost | B unit cost |
|---|---|---|
| By value (₺300 + ₺300) | ₺50 + ₺3 = ₺53 | ₺100 + ₺6 = ₺106 |
| By quantity (₺600 ÷ 150 = ₺4) | ₺50 + ₺4 = ₺54 | ₺100 + ₺4 = ₺104 |
The key should be written down and applied consistently per product group; otherwise cheap items carry too much cost and expensive items too little. Transfers between warehouses carry the same cost; for warehouse-level management see how to manage multi-warehouse inventory.
Returns need a cost rule too: a return should come back at the cost of the original sale, not at the current average. If 10 units come back from Sale 2, ₺1,160 returns to stock under the moving average (10 × ₺116). Had the current average been ₺120, an artificial ₺40 difference would arise. The stock subledger must also reconcile with the general ledger stock account at period end: in the example the subledger is ₺8,120, the account is ₺8,120, and the gap is zero. For the basics, see what is pre-accounting (day-to-day bookkeeping and invoicing).
We recommend reading: What is ABC analysis? Classifying stock and setting policy
What Do Negative Stock and Backdated Changes Cost?
Both change past cost and affect periods that may already have been reported, so the safeguard has to be written into the system's rules.
Negative stock: Sale 1 is entered on day 10, but the goods receipt for Purchase 1 is only recorded on day 12. On day 10 stock is 100 units against a sale of 150, so stock goes to −50. If the system allows negative stock, it costs the missing 50 units at the last known cost (₺100): provisional COGS = ₺10,000 + 50 × ₺100 = ₺15,000, and stock value that day is −₺5,000. When the receipt is recorded, the correct FIFO cost is ₺15,500, so a ₺500 correction is needed (50 × (₺110 − ₺100)).
Backdated correction: Suppose Purchase 1 was entered at ₺105 instead of ₺110 and corrected after the sales. Under the moving average the wrong entry shows Sale 1 at ₺15,500, Sale 2 at ₺20,520, COGS of ₺36,020 and closing stock of ₺7,980. The correct values are ₺36,880 and ₺8,120. The 200 units × ₺5 = ₺1,000 purchase correction splits two ways: ₺860 to COGS (₺500 for Sale 1, ₺360 for Sale 2) and ₺140 to stock.
| Situation | Records affected | Correction | Risk |
|---|---|---|---|
| Negative stock later covered | 1 sale | +₺500 COGS | A report run on provisional cost misstates period profit |
| Purchase cost corrected late | 2 sales, 3 averages | +₺860 COGS, +₺140 stock | A closed-period report changes |
Safeguards: a period lock, a written rule for negative stock (allowed or not, at what cost) and a correction entry for late invoices.
How Do You Choose a Method and Set It Up in the System?
The choice depends on product structure, price movement and system capacity; whether it is acceptable belongs to your financial advisor and auditor. The table below only summarises the business view.
| Method | Strength | Watch out for | Typical fit |
|---|---|---|---|
| FIFO | Tracks batches and dates, close to physical flow | Flatters margin when prices rise; needs layer data | Goods where batch and date matter |
| Moving average | Current cost at every sale | Late corrections force recalculation | Many items, fast-moving trade |
| Periodic average | Simple, one calculation | Cost known only at period end | Low volume, monthly reporting |
| Standard cost | Variance is visible, planning is easy | Variance grows if the standard goes stale | Repetitive production |
Follow these six setup steps.
- Written policy: Set the method per product group together with your financial advisor and write it down.
- Layer data: Make quantity, unit cost, date and source document mandatory on every receipt.
- Cost components: Decide the key for spreading freight, customs and similar items.
- Period lock: Write down the closing date, who can reopen it and how corrections are made.
- Negative stock rule: If allowed, define the cost used and when it is corrected.
- Reconciliation report: Compare the subledger with the general ledger every period, and do not close the period until the gap is zero.
A change of method is a change of accounting policy. In the example, moving from the periodic average to FIFO raises closing stock from ₺7,875 to ₺9,100, an increase of ₺1,225; how such an effect is recorded and reported is for your financial advisor and independent auditor. For foreign-currency purchases see multi-currency and exchange difference management.
What Are Common Inventory Valuation Mistakes?
- Reading FIFO profit as replacement strength: Test the margin again at replacement cost.
- No period lock: A late correction quietly changes a closed period.
- Letting the standard go stale: The variance loses its meaning.
We recommend reading: What is ERP? Modules, how it works and a selection guide
We recommend reading: How to Set Up Lot and Serial Number Traceability: Lot Records, FEFO, Quarantine and Recall Drills
We recommend reading: How to Calculate Landed Cost of Imported Goods: Charge Allocation, Exchange Rate and Margin Guide
We recommend reading: How to Track Scrap and Yield in Manufacturing: Mass Balance, Scrap Types, Standard Rates and Cost Guide
We recommend reading: How to Manage Slow-Moving and Dead Stock: Aging, Classification, Clearance and Decision Guide
Stock and Cost Processes with İnovabil
At İnovabil our focus is building software from scratch for the individual company: custom software, ERP, CRM, e-commerce, web, mobile and integration. Because inventory valuation rules differ from one business to the next, we recommend writing them down during requirements analysis: the cost method (confirmed by your financial advisor), cost components, period lock, negative stock rule and reconciliation report. You and your financial advisor choose the method; we build the rule into the system in an auditable way.
We built CRM, purchasing and mobile for Avcılar İnşaat; a purchasing system for İZBAN; logistics and shipment planning with wholesale order management for Karyak; and warehouse management plus a complaint and support management system for Sleepy. Share a short summary of your stock and cost processes and we will write the rules down together first.
We recommend reading: Our software development process: from analysis to release
Frequently Asked Questions
What are the inventory valuation methods?
The most common are FIFO (first in, first out), weighted average cost (moving or periodic) and standard cost. None changes total cost; each decides how cost is split between goods sold and stock on hand.
What is the difference between FIFO and weighted average?
FIFO books the cost of the oldest batch on each issue, while weighted average books the average cost of all stock on hand. When prices rise FIFO gives higher profit and stock value; when they fall, lower profit. In the example the gap is ₺1,225.
What is the difference between moving and periodic average?
A moving average is updated at every receipt and each sale leaves at the average at that moment. A periodic average computes one average at period end. In the example COGS is ₺36,880 moving and ₺37,125 periodic.
What does variance mean in standard costing?
It is the difference between actual purchase cost and the standard. In the example the standard is ₺115 and the total variance is ₺1,000. Whether the variance is a period expense or an item spread between COGS and stock is an accounting policy.
Which method should I use?
It depends on your product structure, price movement and system capacity; which method is acceptable is for your financial advisor and independent auditor. Define the method as a written policy and apply it consistently.