ADSSystem

COGS calculator

Cost of goods sold from opening stock, purchases and closing stock, or built up per unit from landed cost, packaging, freight and fees.
In one line

Enter opening inventory, purchases and closing inventory to get cost of goods sold for the period, plus the gross profit and margin it produces against your revenue.

COGS = Opening inventory + Purchases − Closing inventory
$
$
$
$
What makes up a $34.99 unit costThe supplier invoice is the tall bar. The rest is where margin quietly goes.Supplier price$24.10Inbound freight and duty$3.85Outbound shipping$2.60Payment processing$1.75Packaging$1.40Returns provision$1.29Quote margin from the supplier price alone and you report 60%. The real figure is 42%.

The formula

COGS = Opening inventory + Purchases − Closing inventory

The formula answers a question that sounds simpler than it is: of everything you bought, how much of it actually left the building. What you spent in a month and what a month cost you are rarely the same figure, and the gap is sitting on a shelf.

What goes into the number

Cost of goods sold contains the costs that attach to a unit. If you sold one fewer this month, the cost would not have been incurred.

In, without argument. The price paid to the supplier, inbound freight and customs duty, the packaging the product ships in, and any labour that physically assembles or finishes the item.

In, but frequently missed. Payment processing fees, at roughly two to three percent of every order. Marketplace commission if you sell on one. Outbound shipping you pay for. Each is charged per order and behaves exactly like a unit cost, and each is routinely parked in overheads, which overstates gross margin by several points.

Out. Warehouse rent, salaried staff, software, advertising. These are the costs of being open rather than the costs of selling, and they belong below gross profit as operating expenses.

The line you draw has to stay drawn. Moving payment fees between the two sections in different quarters makes your own margin trend meaningless, which is a more common problem than getting the classification wrong in the first place.

The same number, per unit

The period formula tells you what a month cost. The per-unit build tells you what a product costs, and it is the version you need before setting a price or a bid.

ComponentPer unitShare of unit cost
Supplier price$24.1068.9%
Inbound freight and duty$3.8511.0%
Packaging$1.404.0%
Payment processing at 2.9%$1.755.0%
Outbound shipping, averaged$2.607.4%
Returns provision at 4%$1.293.7%
Total$34.99100%
This is the same worked example used across the site, split into its parts. It is an illustration of the method, not a benchmark for your category.

Note that the supplier price is only 69 percent of the true unit cost. An operator who quotes margin from the invoice price alone reports 60 percent gross margin on a $60.34 sale. The real figure is 42 percent, and every ROAS target built on the first number is wrong by nearly half.

Why your COGS moves when nothing changed

The period formula is sensitive to inventory in a way that catches people out. Buy heavily ahead of a season and closing inventory rises, which pushes reported COGS down and margin up in a month where nothing improved. Sell that stock down later and the reverse happens.

In the worked example, purchases of $22,100 produced COGS of $21,698 because closing inventory finished $402 higher than it started. Had the same units been sold from existing stock with no purchasing at all, the cash outflow would have been zero and the COGS identical.

This is why COGS is calculated from inventory movement rather than from what you paid suppliers. Cash out and cost of sales are different measurements, and mixing them produces a margin that swings with your purchasing calendar instead of your trading.

The trap

The supplier price is usually about two thirds of what a unit actually costs you.

The most expensive mistake is calculating unit cost once, from a supplier quote, and treating it as fixed. Freight surcharges become permanent. The exchange rate moves four percent. A returns rate that was two percent in the first year settles at six. None of these appear in the invoice price, and all of them come straight out of gross margin.

The second mistake is averaging across a catalogue. A single blended COGS percentage hides the fact that some products are carrying the rest. Two lines at 60 percent margin can subsidise four at 15, and the blended figure looks acceptable right up until the healthy lines go out of stock.

The third is ignoring shrinkage and dead stock. Product that cannot be sold was still bought. Writing it off against inventory rather than against the margin of the goods that did sell flatters the number and hides a sourcing problem.

Recalculate from the last quarter of actual invoices and settlement reports, not from the price list.

Frequently asked

Inbound freight and duty always, because they are part of getting the product to you. Outbound shipping if you pay it, because it is charged per order. If the customer covers the full cost it nets out.

They behave like a unit cost, since they are charged only when an order happens, so including them gives a truer gross margin. Many operators put them in overheads and overstate margin by two to three points.

Because COGS measures what was sold, not what was bought. If closing inventory is higher than opening, some of your purchasing is still on the shelf and has not yet become a cost.

No. It does not attach to a unit sold, so it belongs in operating expenses below gross profit. Putting it in COGS understates gross margin and makes break-even ROAS look worse than it is.