Product Metrics

Search

Glossary

Cost of goods sold (COGS)

Cost of goods sold (COGS) is what it cost you to buy or make the products you sold in a period.

By Berend Vrakking, founder of Product Metrics. Updated 7 October 2026.

Formula

COGS = opening stock + purchases − closing stock

Only the stock you sold counts. IRS Publication 334, a US example, also lists costs such as freight-in and direct labour; what counts as COGS depends on your accounting rules.

Example

A month of buying and selling
StepValue
Opening stock€10,000.00
Purchases in the month€25,000.00
Available to sell (€10,000.00 + €25,000.00)€35,000.00
Closing stock€12,000.00
COGS (€35,000.00 − €12,000.00)€23,000.00

The month’s sales cost €23,000.00 to buy. The €12,000.00 still on the shelf waits its turn. Illustrative data.

For one product, and for an account

Per product, COGS is what you paid for the units you sold: 100 units at €45.00 each is €4,500.00 (illustrative data). Add every product together and you get the shop’s COGS, a large total that says nothing about which product earns its ad spend.

Per-product COGS is the starting point for margin data. Subtract it from the price for gross margin, then subtract shipping, payment fees and returns for contribution margin. Connect those margins and Product Metrics moves from ROAS to POAS.

Common mistake

Counting everything you bought as COGS. Unsold stock is still an asset, so the month you stock up for winter looks like a bad month for profit when it was only a busy month for buying.

Questions

How do you calculate COGS?

Add your purchases to your opening stock, then subtract your closing stock. With €10,000.00 opening stock, €25,000.00 of purchases and €12,000.00 closing stock, COGS is €23,000.00.

Is COGS an income or an expense?

An expense. IRS Publication 334 subtracts it from sales to reach gross profit.

Does COGS include ad spend?

Usually not. Ad spend, shipping to customers and payment fees sit outside COGS, which is why contribution margin takes them off separately.

Keep reading