At period end, an ecommerce seller needs to know not just how many units remain, but what those units are worth. The same SKU may have been bought at different prices: 100 units at ₹400 and another 100 at ₹460. A consistent cost formula determines the cost assigned to units sold and the value carried as closing inventory.
For ecommerce sellers, FIFO and weighted average are the two common inventory valuation methods for ordinarily interchangeable goods under applicable Indian accounting standards. The choice affects closing stock, cost of goods sold (COGS) and reported gross profit. TallyPrime can calculate stock values using configured costing methods, but a software setting does not by itself determine the accounting policy a seller should use. Physical warehouse records, the accounting cost formula and the value recorded in the books must agree, while remaining distinct functions.
What Is Inventory Valuation in Ecommerce?
Inventory valuation assigns a monetary cost to goods held for sale at a reporting date. The quantity tells you what is physically available; valuation determines the cost recognised for units sold and for units still held.
Three figures are linked:
- Opening inventory: cost carried forward from the prior period.
- COGS: cost assigned to inventory sold during the period.
- Closing inventory: cost assigned to units remaining at period end.
For a trading business, the basic relationship is:
COGS = Opening Inventory + Purchases and Eligible Costs − Closing Inventory
This assumes the relevant purchases, returns and adjustments have been recorded consistently. Closing value is not simply closing quantity multiplied by the latest purchase price. The selected cost formula allocates costs across available units; inventory must also be assessed under the applicable lower-of-cost-and-net-realisable-value requirement.
What costs are included in inventory valuation?

Inventory cost generally includes the purchase price, non-refundable duties and taxes, freight inward, handling and other directly attributable costs needed to bring goods to their present location and condition. For manufactured or assembled products, eligible conversion costs may also form part of cost. Trade discounts and rebates reduce purchase cost.
Recoverable GST is ordinarily excluded where the business is entitled to claim it back. Selling costs and unrelated administration expenses are not added merely because they are business costs; ordinary storage costs are generally excluded unless necessary before a further production stage. The detail depends on the applicable standard and facts. Both AS 2 and Ind AS 2 address purchase costs, directly attributable costs and measurement at the lower of cost and net realisable value. The Income Tax Department’s ICDS material addresses taxable-income computation where applicable; it does not replace the financial-reporting standard. ICDS, AS 2 and Ind AS 2 are related but not interchangeable frameworks.
FIFO vs Weighted Average: How the Two Inventory Valuation Methods Work

Both formulas assign acquisition costs to units sold and units on hand; they differ in how those costs flow through the calculation.
FIFO (First In, First Out)
FIFO assumes the earliest purchased or produced units are sold or consumed first. As a result, closing stock generally represents more recent purchase layers. If purchase prices are rising, FIFO will often show a higher closing inventory value, and lower COGS, than weighted average for the same transactions. If costs are falling, the relative effect can reverse. The result depends on the quantities, prices and timing of actual transactions, so FIFO does not always mean higher profit.
FIFO is an accounting cost-flow assumption. It does not prove that a warehouse physically picked the oldest-received unit. A warehouse may use batch or location rules, or FEFO, which selects the item with the earliest expiry date. Those operational rules need to be configured and monitored separately.
Weighted average cost
Weighted average assigns similar units a blended cost based on their quantities and total costs. It is not the simple average of price tags when purchase quantities differ.
Weighted average cost per unit = Total cost of units available ÷ Total units available
Under a periodic weighted average, the business calculates the blended cost over a defined period, using opening inventory and eligible purchases during that period. Under a moving weighted average, the cost is recalculated as each new purchase or shipment is received, and subsequent issues use the updated average. AS 2 and Ind AS 2 allow an average to be calculated periodically or as each additional shipment is received, depending on circumstances.
FIFO and weighted average compared
| Factor | FIFO | Weighted average |
|---|---|---|
| Cost allocation | Earlier purchase layers are assigned to sales first | Similar-unit costs are blended |
| Closing stock | Usually reflects more recent cost layers | Reflects the blended average cost |
| Price changes | More direct effect of latest layers on closing stock | Smooths variation between purchase prices |
| Cost visibility | Preserves cost layers in the formula | Uses an average per unit |
| Suitable context | Where cost layers or sequence are useful | Frequent purchases of similar interchangeable goods |
Neither method is universally superior. Consider inventory type, purchasing patterns, the cost records available and the applicable reporting framework.
FIFO and Weighted Average Inventory Valuation Example

Assume an ecommerce seller buys the same interchangeable SKU in two batches and sells 120 units during the period:
| Purchase | Quantity | Unit cost | Total cost |
|---|---|---|---|
| Batch 1 | 100 | ₹400 | ₹40,000 |
| Batch 2 | 100 | ₹460 | ₹46,000 |
| Total available | 200 | ₹86,000 |
There are 80 units left. For a clear comparison, assume no returns, discounts, freight adjustments, write-downs or other costs.
Closing stock under FIFO
The 120 units sold are costed as 100 from Batch 1 and 20 from Batch 2. The remaining 80 units are from Batch 2:
Closing inventory: 80 × ₹460 = ₹36,800
COGS: (100 × ₹400) + (20 × ₹460) = ₹49,200
Closing stock under weighted average
The weighted average cost is ₹86,000 ÷ 200 = ₹430 per unit. Apply it to both units sold and units remaining:
Closing inventory: 80 × ₹430 = ₹34,400
COGS: 120 × ₹430 = ₹51,600
| Cost formula | Closing inventory | COGS |
|---|---|---|
| FIFO | ₹36,800 | ₹49,200 |
| Weighted average | ₹34,400 | ₹51,600 |
| Difference | ₹2,400 | ₹2,400 |
The ₹2,400 difference arises solely from cost allocation. Under either method, COGS plus closing stock equals the ₹86,000 cost available. This illustration is not a prescribed journal entry or a current TallyPrime calculation for every configuration.
How Should Ecommerce Sellers Choose a Valuation Method?

Select a supportable formula for the inventory’s nature and use, and apply it consistently. AS 2 and Ind AS 2 require the same formula for similar inventory; a different formula needs a genuine difference in nature or use, not just another warehouse or tax rule.
When FIFO may fit
FIFO may suit identifiable purchase layers, or products where assigning older costs to issues and showing more recent costs in closing stock is useful. Do not confuse this accounting method with physical FIFO rotation or FEFO picking.
When weighted average may fit
Weighted average may be practical for high volumes of similar interchangeable goods bought frequently at different prices, where an averaged cost is meaningful and individual batch cost is not needed for financial allocation. Choose periodic or moving average based on transaction pattern, records and the method your accounting system can apply consistently.
When specific identification may fit
Specific identification assigns the actual cost to identified units. It may be suitable for non-interchangeable or separately traceable high-value goods, or items bought or produced for a specific project. It is generally not appropriate for large quantities of interchangeable units where choosing which item remains could produce arbitrary results.
Do not treat the method as a tool to select a preferred profit figure. The policy and any proposed change should be assessed by the accountant under the seller’s applicable accounting framework and disclosure requirements.
What Does TallyPrime Expect? FIFO, Average Cost and Stock Valuation

TallyPrime calculates stock value using the costing method configured for a stock item. Its current help lists Average Cost, FIFO, FIFO Perpetual, Monthly Average Cost, Last Purchase Cost and other options. It distinguishes costing method, which calculates stock value, from market valuation method, used for selling-price analysis. The latter is not an accounting cost formula or a lower-of-cost-and-NRV assessment.
How to set a costing method in TallyPrime
The current TallyPrime stock valuation instructions document these steps:
- Press Alt+G (Go To), select Alter Master, then Stock Item.
- Select the relevant stock item and press Enter.
- Press F12 (Configure) and set Use Costing and Market Valuation Methods for Stock Items to Yes.
- In the stock item alteration screen, select the required Costing Method.
- Press Ctrl+A to save.
Costing can be set per stock item. Check item masters, units, opening balances and purchase data before relying on reports. Average Cost is the documented default, not a recommendation for every entity.
Compare closing stock values
To compare methods in a report, open Balance Sheet or Stock Summary through Alt+G. In the report, use Alt+N (Auto Column) to select stock valuation methods, then Ctrl+B (Basis of Values) and choose the relevant Stock Valuation Method. Use the detailed view to inspect the result. The exact report options can depend on the screen and version; follow the current TallyHelp instructions for the installed release.
Changing the method does not rewrite vouchers, but recalculates stock value and may change reports. Do not switch for a preferred closing figure; assess the policy impact and disclosures with the accountant.
TallyPrime may display LIFO among its costing options. That software availability does not make LIFO an appropriate financial-reporting formula under AS 2 or Ind AS 2 for ordinarily interchangeable inventory. Those standards specify FIFO or weighted average for such inventory, with specific identification for appropriate items. Keep the distinction between a software menu and the governing standard explicit.
How to Maintain Accurate Inventory Records Between Warehouse and Accounts

Valuation is only as reliable as the quantity and cost data behind it. A practical close includes three reconciliations:
- Purchases: record ordered and received quantities, supplier invoice and goods-receipt references, actual prices, eligible freight or handling, discounts, supplier returns and cost adjustments. Keep supplier invoices and freight evidence linked to the receipt.
- Warehouse movements: record receipts, sales dispatches, inter-warehouse transfers, customer returns, damaged or quarantined goods, write-offs and stock corrections. Separate sellable stock from returned units awaiting inspection. Perform periodic stocktakes and investigate negative stock and quantity variances before closing.
- Financial values: map SKU, unit of measure, location and transaction references between operational and accounting records. Review purchases in transit and cutoff timing so receipts and invoices are reflected in the correct period under policy.
Warehouse teams may pick by FIFO or FEFO, while accounting calculates cost using FIFO or weighted average. For example, a warehouse may pick the batch expiring first even when it arrived later. Physical movement does not automatically decide which cost layer the books assign to the issue.
Before close, reconcile purchases, receipts, sales, returns and adjustments; finalise quantities and values, then assess damaged, obsolete or slow-moving stock for any required NRV write-down.
How Inventory Management and Accounting Software Work Together
Warehouse and inventory management are operational layers. An inventory management system for warehouse operations or WMS maintains SKU and variant quantities, locations, receipts, transfers, batches or expiry dates where supported, picking, returns and adjustments. It shows what stock is present and where, not the financial valuation policy.
TallyPrime calculates stock values under its configured method. A quantity sync alone cannot confirm value; unit costs, eligible acquisition costs, discounts, returns, opening balances and item mapping must also be complete. Accounting automation software can reduce rekeying, but test data mapping and voucher treatment. Invoice automation and payables automation can capture supplier bills; they do not choose the cost formula.
Our WMS supports warehouse locations, stocktakes and inventory movements. It also supports AVCO and FIFO purchase-cost calculations, helping businesses maintain inventory cost records alongside their warehouse operations.
Our TallyPrime integration supports invoice handling and the exchange of product information, stock and prices with connected channels. For setup details, see our TallyPrime integration guide. Our Order Manager centralises orders from connected marketplaces and stores, while our multichannel inventory capabilities help teams maintain stock visibility across sales channels.
Common Inventory Valuation Mistakes Ecommerce Sellers Should Avoid
| Mistake | Why it causes problems |
|---|---|
| Using selling price as stock cost | Can overstate inventory value |
| Applying the latest purchase price to every unit | May ignore the selected cost formula |
| Omitting eligible freight or handling | May understate acquisition cost |
| Including recoverable GST in cost | Can distort inventory value |
| Treating FIFO as a picking instruction | Confuses cost formula with warehouse movement |
| Combining damaged and sellable stock | May overstate recoverable value |
| Changing the costing method without review | Risks inconsistent reporting |
| Skipping stock reconciliation | Makes closing quantities and values unreliable |
Also inspect damage, obsolescence and reduced selling prices. Under AS 2 and Ind AS 2, inventory is measured at the lower of cost and net realisable value. NRV is the expected selling price in the ordinary course of business less estimated completion and selling costs. Where NRV falls below cost, the required write-down should be evaluated and recorded under the applicable framework.
Conclusion
Inventory valuation methods for ecommerce work only when consistent policies, accurate warehouse quantities and purchase costs flow into TallyPrime. Reconcile both stock and value at every close.