> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dualentry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How Inventory Costing Works

> How DualEntry costs inventory with FIFO or weighted average, which method applies to an item, and how locations, backdating, and landed costs affect cost.

DualEntry costs inventory perpetually, with one of two methods: FIFO (first in, first out) or weighted average. Each time stock leaves a location, DualEntry prices it under the item's method at the moment the record posts and writes that cost to the general ledger. This page explains how each method works, which one applies to an item, and the rules that keep posted costs from changing. To choose a method, see [How to Set Up Inventory](https://docs.dualentry.com/accountants/core-financials/inventory/set-up-inventory.md#step-1-choose-the-costing-method).

## Perpetual costing at the point of movement

Costing happens when a document posts, not at period end. An item receipt adds stock at its cost. An item fulfillment, an adjustment down, or a transfer out removes stock at the cost the method assigns at that moment, and that cost goes to the item's expense account (cost of goods sold) or to wherever the record sends it. Once posted, the cost is fixed. A later receipt at a different price doesn't reach back and re-price stock that already left.

Editing a posted record works the same way. DualEntry restores the stock and cost layers the record used, then prices the new quantity once. Archiving a record reverses its stock, cost layers, and journal lines, and it's refused if the stock it brought in has already been used.

Because cost is fixed at posting, the inventory postings keep the inventory asset account at the value of stock still on hand, and cost of goods sold at the value that left. There's no separate period-end costing run. A journal entry posted straight to an inventory asset account is the exception: it changes the ledger but not the cost layers, so the account no longer matches stock on hand. See [Costing methods and accounting standards](#costing-methods-and-accounting-standards).

## FIFO and weighted average

DualEntry offers two cost formulas, and they differ in which cost leaves with the stock: the cost of specific receipts under FIFO, or a running average under weighted average. Both examples below use the same two receipts at one location.

### FIFO

Under FIFO, each receipt creates a cost layer: a quantity at a unit cost. When stock leaves, DualEntry uses up the oldest open layer first, then the next oldest, until the quantity is covered. Layers are ordered by the date of the movement that created them, not by when you entered the record.

Take an item with two receipts at one location: 10 units at $5.00 on 03/01/2026 and 10 units at $6.00 on 03/10/2026. A fulfillment of 15 units on 03/15/2026 costs $80.00: all 10 units of the first layer ($50.00) and five units of the second ($30.00). The five units left on hand are valued at $30.00.

FIFO keeps the value of stock on hand close to recent purchase prices, and cost of goods sold reflects older prices. It also lets you trace each outbound cost to the receipts it came from.

### Weighted average

Under weighted average, DualEntry keeps a running total quantity and total value for the item at each location. The unit cost is the total value divided by the total quantity, and it's recalculated each time stock comes in. Stock that leaves takes the current unit cost.

With the same two receipts, the average after 03/10/2026 is $5.50 (20 units worth $110.00). The fulfillment of 15 units on 03/15/2026 costs $82.50, and the five units left are valued at $27.50.

Weighted average smooths price swings, so cost of goods sold moves less from one sale to the next. It doesn't keep separate layers, so an outbound cost can't be traced to one receipt.

## Which method applies to an item

The organization's **Default costing method** is the starting point, and it's FIFO unless you change it. A company can have its own method under **Costing method by entity**. Each inventory item also records the method in force when it was created.

When stock moves, DualEntry uses the first of these that's set:

1. The company's own method
2. The item's recorded method
3. The organization default

A company's own method therefore wins over an item's method. The same item can be costed by FIFO in one company and by weighted average in another.

Two rules keep a change from restating posted balances. An item's method is fixed once its stock has moved, and a company's own method is fixed once that company has posted stock movements. Changing the organization default affects only items created afterward. Stock that already moved keeps the cost it was priced at.

### Serialized items

A serialized item tracks each unit by serial number, and its **Serialized costing behavior** decides whether those serial numbers affect cost. **Tracking only** records serial numbers but costs the item under the method that applies above, FIFO or weighted average. **Actual cost by serial** sets that method aside: each serial number keeps the cost it arrived at, and the unit that leaves carries exactly that cost. This is specific identification of cost, which suits goods that aren't interchangeable, such as equipment with individual serial numbers. Like the costing method, the serialized costing behavior is fixed once the item's stock has moved.

## Costing by company, location, and item

Cost is kept separately for each combination of company, location, and item. The same item in two warehouses has two sets of FIFO layers, or two running averages, and stock leaving one warehouse never consumes cost from the other.

A transfer between locations moves stock at its carrying cost, with no gain or loss. The transfer shipment moves stock from the source location into the company's in-transit location at its carrying cost, even when it's shipped and received on the same day. The transfer receipt brings it into the destination at the same cost, where it joins the destination's layers or average.

## Negative stock and backdated movements

DualEntry doesn't allow negative stock. A fulfillment, adjustment down, or transfer that asks for more units than the location currently holds is refused with `Insufficient stock for item ...`, so every outbound movement has real cost to draw from.

Backdating works differently by method. Under FIFO, a backdated receipt becomes a layer in date order, but stock that already left keeps its posted cost. Under weighted average, an earlier movement would change an average that later records already used, so DualEntry refuses a backdated ownership recognition, transfer shipment, transfer receipt, or in-transit adjustment dated before the item's latest movement at that location. Use a date on or after that movement.

## Landed costs and cost adjustments

A landed cost is a cost of getting goods to your location, such as freight, duty, or insurance. Each landed-cost category is set up as **Capitalized** or **Expensed** under **Configuration > Accounting Setup > Landed-cost categories**.

A capitalized landed cost becomes part of the item's cost. When you receive stock, its estimated landed cost per unit is added to the unit cost of the receipt, so it flows into the FIFO layer or the weighted average. An expensed landed cost posts to the category's expense account and never touches item cost.

When a bill's capitalized landed cost is more than the estimate, or a bill line marked **Final** bills less than it, DualEntry drafts a cost adjustment for the difference. Posting it changes the value of the stock that was received. DualEntry splits the difference between units still on hand, which move their layer or average, and units already sold, which go to cost of goods sold. The quantity on hand doesn't change. A cost adjustment takes the day you post it as its accounting date, and that date must fall in an open accounting period.

## Costing methods and accounting standards

FIFO and weighted average are both permitted cost formulas under ASC 330 and IAS 2, and DualEntry runs them the same way whichever framework you report under. LIFO is permitted under US GAAP but prohibited under IAS 2. DualEntry doesn't offer LIFO, standard cost, or retail method costing.

Both standards also require measuring inventory at the lower of cost and net realizable value. DualEntry doesn't calculate that test or post a write-down for you. Assess it outside DualEntry and record any write-down as a [journal entry](https://docs.dualentry.com/accountants/core-financials/general-ledger/journal-entries.md). An inventory adjustment changes quantity along with the related inventory value, so don't use it for a value-only write-down. The **Inventory Valuation** report values stock from its cost layers, so a write-down posted as a journal entry shows in the general ledger but not in that report.

## Related reading

* [How to Set Up Inventory](https://docs.dualentry.com/accountants/core-financials/inventory/set-up-inventory.md)
* [Inventory Items and Accounts Reference](https://docs.dualentry.com/accountants/core-financials/inventory/inventory-items-and-accounts.md)
* [Inventory Records Reference](https://docs.dualentry.com/accountants/core-financials/inventory/inventory-records-reference.md)
* [Inventory Reports Reference](https://docs.dualentry.com/accountants/reporting-analytics/inventory-reports.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.