# Inventory and cost of goods sold

> October's drills, costed FIFO and by weighted average, counted against the record, and written down to what they will sell for.

Source: https://lopifi.com/learn/inventory-and-cost-of-goods-sold
Part of: Lopifi — US GAAP books on autopilot, checked by a CPA (https://lopifi.com)

---

**How do you calculate cost of goods sold and value inventory?** October's drills, costed FIFO and by weighted average, counted against the record, and written down to what they will sell for.

Northwind closed September with $1,000 of [Inventory](https://lopifi.com/md/glossary/inventory): twenty cordless drills at $50 each. In October it delivers the dozen the deposit paid for, restocks at a higher price, sells a trade order and counts the shelf. Every one of those moves asks the same question: what did the goods that left cost? That figure is [cost of revenue](https://lopifi.com/md/glossary/cost-of-revenue), and it decides the [gross margin](https://lopifi.com/md/glossary/gross-margin).

- **Oct 1** — Opening stock: 20 drills at $50
- **Oct 6** — The deposit order delivered: 12 drills out
- **Oct 10** — Restock: 40 drills in at $55, on 30-day terms
- **Oct 20** — Trade order: 30 drills out at $240 each
- **Oct 31** — Count: 17 on the shelf against 18 on the record

The drills' October, in order.

## Which drills left? A cost-flow assumption

Once drills bought at two prices sit on one shelf, nobody can say which physical drill went out. So the books assume an order. [First-in, first-out](https://lopifi.com/md/glossary/fifo) assumes the oldest leave first. [Weighted-average cost](https://lopifi.com/md/glossary/weighted-average-cost) gives every drill on the shelf the same average cost. US GAAP allows both (and LIFO), and Northwind's policy is FIFO.

|  | FIFO | Weighted average |
| --- | --- | --- |
| Opening inventory | 1,000 | 1,000 |
| Purchased | 2,200 | 2,200 |
| Out — OCT-3, 12 drills | (600) | (600) |
| Out — OCT-5, 30 drills | (1,610) | (1,625) |
| Out — OCT-9, 1 drills | (55) | (54.17) |
| Closing inventory, before any write-down | 935 | 920.83 |

The same October, costed both ways. Same drills, same count; different cost of revenue and a different shelf.

Prices rose in October, from $50 to $55 a drill. FIFO sends the cheaper, older drills out first, so it reports the lower cost of revenue and leaves the shelf at the newest prices: $935 against $920.83. When prices fall, the order reverses. Over the life of the stock the two methods expense the same total; they disagree about which month.

**Exercise — Cost the drills, first in, first out.** October opens with 20 drills at $50 each, and 40 more arrive on October 10 at $55. Cost each issue first-in, first-out: the oldest drills leave first. Type it in the workbook at https://lopifi.com/playground.

**FIFO**
- Pro: The shelf is valued near current prices
- Pro: Every unit leaves at a cost it came in at — no rounding
- Con: In rising prices, a higher gross margin than the replacement cost supports
- Best for: Goods that really do sell oldest-first, and most small resellers

**Weighted average**
- Pro: Smooths price swings out of the margin
- Pro: No layers to track
- Con: The average is recomputed after every purchase
- Con: Each issue rounds, to the cent
- Best for: Interchangeable goods bought often at varying prices — fuel, grain, bulk parts

The two cost-flow methods most startups choose between.

## The entries

## The count

A [perpetual](https://lopifi.com/md/glossary/perpetual-inventory) record says what *should* be on the shelf. On October 31 the record says 18 drills, and the count finds 17. The missing one is [Shrinkage](https://lopifi.com/md/glossary/shrinkage): lost, stolen, broken or never received. It leaves inventory at its FIFO cost, $55, as a loss of October. It isn't a sale, so it doesn't belong in the margin on the drills sold, and Northwind books it to its own line inside cost of revenue.

The periodic system gets to the same place without a record: opening stock, plus purchases, less the count. $1,000 + $2,200 − $935 = $2,265. That's the $2,210 of drills sold plus the $55 lost, together, because a count can't tell a sale from a loss. That's what the perpetual record buys.

1. **Freeze the shelf.** Stop receiving and shipping, or note exactly what moved during the count.
2. **Count blind.** Two people, one counting, one recording, neither the person who keeps the record.
3. **Compare to the record.** Every difference is investigated before it's booked: a receipt keyed twice is not shrinkage.
4. **Book what's real.** Shrinkage at cost; then test what's left against what it will sell for.

Counting stock at a month end.

> **Inventory is cost on hold. The method decides which cost leaves first, the count decides what's really there, and net realizable value caps what the rest may be carried at.**

In this lesson: what happens when stock on the shelf is worth less than it cost has its own page below.

## Pages in this lesson

- [Lower of cost and net realizable value](https://lopifi.com/md/learn/inventory-and-cost-of-goods-sold/lower-of-cost-and-net-realizable-value) — 4 min. When do you write inventory down to net realizable value?

## Where this lesson's rules come from

- [ASC 330-10-35-1B](https://asc.fasb.org/330/tableOfContent) — FIFO and average-cost inventory is carried at the lower of cost and net realizable value (codification)
- [ASC 330](https://asc.fasb.org/330/tableOfContent) — Inventory (codification)
- [Wikipedia, “Cost of goods sold”](https://en.wikipedia.org/wiki/Cost_of_goods_sold) — Cost of goods sold (reference)
- [Wikipedia, “FIFO and LIFO accounting”](https://en.wikipedia.org/wiki/FIFO_and_LIFO_accounting) — FIFO and LIFO accounting (reference)
- [Wikipedia, “Inventory valuation”](https://en.wikipedia.org/wiki/Inventory_valuation) — Inventory valuation (reference)
- [Wikipedia, “Lower of cost or market”](https://en.wikipedia.org/wiki/Lower_of_cost_or_market) — Lower of cost or market (reference)

## Read further

- https://lopifi.com/md/journal-entries/inventory-purchase
- https://lopifi.com/md/journal-entries/inventory-write-down
- https://lopifi.com/md/calculators/inventory-turnover
- https://lopifi.com/md/calculators/dio
- https://lopifi.com/md/calculators/cash-conversion-cycle
- https://lopifi.com/md/accounting/cost-of-revenue
- https://lopifi.com/md/accounting/gross-margin
- https://lopifi.com/md/tools/margin
- https://lopifi.com/md/docs/domain/01-accounting-model
- https://lopifi.com/md/docs/domain/06-procure-to-pay

- **Track:** [Accounting](https://lopifi.com/md/learn/accounting)
- **Lesson:** Lesson 17 of 17 — 10 min
- **Terms taught:** [Inventory](https://lopifi.com/md/glossary/inventory), [Cost of revenue](https://lopifi.com/md/glossary/cost-of-revenue), [Perpetual inventory](https://lopifi.com/md/glossary/perpetual-inventory), [FIFO](https://lopifi.com/md/glossary/fifo), [Weighted-average cost](https://lopifi.com/md/glossary/weighted-average-cost), [Shrinkage](https://lopifi.com/md/glossary/shrinkage), [Net realizable value](https://lopifi.com/md/glossary/net-realizable-value), [Gross margin](https://lopifi.com/md/glossary/gross-margin), [Inventory turnover](https://lopifi.com/md/glossary/inventory-turnover)
- **Previous:** [Selling a fixed asset, Accounting · Lesson 16](https://lopifi.com/md/learn/fixed-assets-and-depreciation/selling-a-fixed-asset)
- **Next:** [Lower of cost and net realizable value](https://lopifi.com/md/learn/inventory-and-cost-of-goods-sold/lower-of-cost-and-net-realizable-value)
- **The course:** https://lopifi.com/md/learn
