JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

The COGS Formula: Beginning + Purchases - Ending

One short equation ties together everything a store buys and everything it has left, and quietly hands you the cost of everything it sold. Master it and you will see why ending inventory and cost of goods sold are two halves of a single pie.

The pile you start with, the pile you add, the pile you keep

In the first guide of this rung you met the two ways a business keeps track of its stock — the perpetual system that updates with every sale, and the periodic system that simply counts what is left at the end and works backward. This guide is about that *working backward*. Picture a small tea shop's storeroom. At the start of the month there is already some tea on the shelves; during the month more tea is delivered; at the end of the month some tea is still sitting there unsold. Those three piles — the one you started with, the one you added, and the one you kept — are all you need to find the cost of the tea that walked out the door.

The logic is almost embarrassingly simple, which is why it is so easy to trust. Whatever tea you *had available* to sell this month is the tea you started with plus the tea you bought. Of that available tea, whatever is *not still on the shelf* must have left — and the only honest way for stock to leave a shop is by being sold. So the cost of what you started with, plus the cost of what you bought, minus the cost of what remains, equals the cost of what you sold. That single sentence is the [[cost-of-goods-sold-formula|cost of goods sold formula]], and the rest of this guide is just learning to fill in each piece honestly.

Cost of goods available for sale: the middle step everyone skips

It helps to break the formula at its natural joint. The first two piles — what you started with plus what you bought — add up to a quantity with its own name: the [[cost-of-goods-available-for-sale|cost of goods available for sale]]. This is the total cost of every unit that *could* have been sold during the period, whether it actually was or not. Beginning inventory is last period's leftover, carried in at its cost; net purchases is everything bought this period, measured at cost. Add them and you have the full pool of cost to account for.

Why bother naming the middle step? Because it makes the whole formula a story of *splitting one pool in two*. Every dollar of cost in the available-for-sale pool must end up in exactly one of two places: either it walked out as cost of goods sold (an expense on the income statement), or it stayed behind as ending inventory (an asset on the balance sheet). There is no third drawer. Once you see that the pool of available cost is simply divided between the income statement and the balance sheet, the formula stops being something to memorize and becomes something you can rebuild from scratch.

  Beginning inventory          8,000
+ Net purchases               42,000
  ---------------------------------------
= Cost of goods available     50,000   <- one pool of cost to split

  Cost of goods available      50,000
- Ending inventory           (11,000)   <- the half that STAYED (asset)
  ---------------------------------------
= Cost of goods sold          39,000    <- the half that LEFT (expense)
The formula split at its joint. The two piles you start with add to 50,000 of available cost; that single pool is then divided in two. Whatever 11,000 stayed on the shelf is the asset; the remaining 39,000 is the expense. Count one and the other is forced — that is the seesaw at the heart of this guide.

Two sides of one coin: ending inventory and COGS

Here is the single most important idea in inventory accounting, and the reason this rung exists. Because the available pool is fixed, ending inventory and cost of goods sold are locked together like two ends of a seesaw: push one up and the other must come down by exactly the same amount. If your physical count says more tea remained, then less must have been sold, so COGS falls. If you count too little remaining, COGS rises to match. They are not two independent numbers you compute separately — they are two ways of slicing the *same* pie, and the slices must add back to the whole.

This coupling has a sharp consequence that catches many beginners: a mistake in counting ending inventory is automatically a mistake of the opposite sign in cost of goods sold, and therefore in profit. Overstate ending inventory by 1,000 — say you double-count a crate — and you have understated COGS by 1,000, which overstates this period's gross profit by 1,000. The error does not stay put, either: this period's ending inventory becomes next period's beginning inventory, so the mistake flips sign and haunts the following period too. Inventory errors are never local; they ripple across the seesaw and across time.

What really counts as a purchase: freight, returns, discounts

So far we said "net purchases" as if the meaning were obvious, but the word *net* is doing real work, and getting it right is where most of the craft lives. The gross invoice price of the goods is only the starting point. To find the true cost of the inventory you must add the cost of getting it to your door and subtract every reduction the supplier granted. The guiding rule is the cost principle you learned long ago: an asset is recorded at *everything you reasonably spent to get it ready to sell*, no more and no less.

[[freight-in|Freight-in]] — the shipping you pay to bring goods *to* you — is part of the cost of inventory, not a separate expense. This trips people up because it feels like a delivery bill, yet the tea is not ready to sell until it is on your shelf, so the freight to get it there clings to the goods as cost. (Be careful: freight-*out*, the cost of shipping goods *to your customer* after a sale, is a selling expense, not inventory — it belongs below the line, with the period costs.) Then come the subtractions. Purchase returns and allowances undo goods you sent back or price cuts you negotiated for damaged stock; you never truly bought those, so they reduce purchases.

Finally, [[purchase-discounts|purchase discounts]]: a supplier often offers terms like "2/10, net 30" — pay within 10 days and take 2% off, otherwise the full amount is due in 30. If you pay early and take the discount, you genuinely spent less to acquire the goods, so the discount reduces the cost recorded in inventory. Put the pieces together and the real definition emerges: net purchases equals the gross purchase price, plus freight-in, minus purchase returns and allowances, minus purchase discounts. That is the honest number that belongs in the formula — not the sticker price on the invoice.

A clean worked example, start to finish

Let us run the whole machine once with numbers. Maya's tea shop starts March with beginning inventory of 8,000. During the month she places orders with a gross invoice price of 45,000. The supplier ships them and she pays 1,500 of freight-in to get the crates to her storeroom. A batch of stale tea worth 1,800 is sent back as a purchase return, and by paying early she earns 1,200 in purchase discounts. Watch how each adjustment we just discussed lands in its place.

  1. Find net purchases: gross 45,000 + freight-in 1,500 - returns 1,800 - discounts 1,200 = 43,500.
  2. Find cost of goods available for sale: beginning inventory 8,000 + net purchases 43,500 = 51,500.
  3. At month-end, Maya physically counts the tea still on her shelves: it is worth 12,500. That is ending inventory.
  4. Find cost of goods sold: available 51,500 - ending inventory 12,500 = 39,000.

So Maya's cost of goods sold for March is 39,000. Notice she never counted a single sale to get there — she let the formula do the work, deducing what left from what stayed. If her tea sold for 62,000 over the month, her gross profit is 62,000 minus 39,000, or 23,000; and that 12,500 of ending inventory now carries forward as April's beginning inventory, ready to start the seesaw again. Every figure ties back to the two piles she could actually see and count: what she bought, adjusted honestly, and what she had left.