Product Metrics

Search

Free calculator

COGS calculator

Enter your beginning inventory, purchases and ending inventory to get the cost of goods sold (COGS) for the period. Add revenue to see gross profit and gross margin. The calculator also gives your average inventory and inventory turnover.

Inventory and purchases
€

Value of your stock at the start of the period, at cost

€

Stock bought during the period, at cost and excl. VAT

€

Value of your stock at the end of the period, at cost

Optional
€

Freight-in or other costs you count in COGS. Leave empty if you do not.

€

Sales for the same period, excl. VAT. Adds gross profit and gross margin.

Your results

Of the €35,000.00 you could sell, €23,000.00 was sold, at cost. €12,000.00 is still in stock.

Cost of goods sold
€23,000.00
Beginning inventory + purchases + other direct costs − ending inventory
Goods available to sellBeginning inventory + purchases + other direct costs
€35,000.00
Average inventory(Beginning inventory + ending inventory) ÷ 2
€11,000.00
Inventory turnoverCOGS ÷ average inventory
2.09

With revenue

Gross profit
€23,000.00
Revenue − COGS
Gross margin
50%
Gross profit ÷ revenue

Enter every amount at cost and excl. VAT. What counts as COGS, and how you value stock, depends on your accounting rules.

The start values are illustrative data.

Every step behind the numbers, worked through for the start values.

Illustrative data. A shop started the month with €10,000.00 of stock and bought €25,000.00 more. It ended the month with €12,000.00 of stock and €46,000.00 of revenue, all at cost and excl. VAT.

Worked example for the calculator's start values
StepCalculationResult
Goods available to sell€10,000.00 + €25,000.00€35,000.00
Cost of goods sold€35,000.00 − €12,000.00€23,000.00
Average inventory(€10,000.00 + €12,000.00) ÷ 2€11,000.00
Inventory turnover€23,000.00 ÷ €11,000.002.09
Gross profit€46,000.00 − €23,000.00€23,000.00
Gross margin€23,000.00 ÷ €46,000.0050%

The month’s sales cost €23,000.00 to buy. The €12,000.00 still on the shelf waits for next month. Of every €1.00 of revenue, €0.50 is left after COGS. The average stock sold through 2.09 times.

Six numbers, and where each one comes from.

Beginning inventory

The value of your stock at cost at the start of the period. It is the ending inventory of the last period, so it should match your last count.

Purchases

What you bought during the period, at cost and excl. VAT. It is not what you sold: stock you bought and still hold stays out of COGS.

Other direct costs

Freight-in and other costs of getting products ready to sell, if your accounting counts them in COGS. Leave the field empty if not.

Ending inventory

The value of your stock at cost at the end of the period, from a count or your inventory system. It cannot be more than the goods available to sell.

Average inventory

(Beginning + ending inventory) ÷ 2. It is the base for inventory turnover: COGS ÷ average inventory shows how often you sold through your stock.

Gross margin

(Revenue − COGS) ÷ revenue. It sits before shipping, ads, payment fees and returns. Contribution margin takes those off as well.

What COGS cannot tell you, and what to read next to it.

Which products earn their ad spend

A shop-wide COGS total hides the products that lose money. Per-product COGS is the starting point for margin data.

Profit after ads and shipping

Gross profit leaves out ad spend, shipping to customers, payment fees and returns. Use the contribution margin for those.

Your accounting rules

What counts as COGS, and how stock is valued (FIFO, average cost and others), depends on your accounting rules and country. Your accountant decides it for tax filings.

A wrong stock count

Ending inventory drives the result. A count that is €1,000.00 too high makes COGS €1,000.00 too low.

COGS questions, answered.

How do you calculate COGS?

Add your purchases to your beginning inventory, then subtract your ending inventory. With €10,000.00 beginning inventory, €25,000.00 of purchases and €12,000.00 ending inventory, COGS is €10,000.00 + €25,000.00 − €12,000.00 = €23,000.00.

How do you get gross profit and gross margin from COGS?

Subtract COGS from revenue for gross profit, then divide by revenue for gross margin. With €46,000.00 of revenue, gross profit is €46,000.00 − €23,000.00 = €23,000.00 and gross margin is €23,000.00 ÷ €46,000.00 = 50%.

Does COGS include shipping and ad spend?

Ad spend, shipping to customers and payment fees usually sit outside COGS. Freight-in, the cost of getting stock to you, is counted by some businesses: with €1,500.00 of freight-in, COGS in the example would be €24,500.00. What counts depends on your accounting rules.

What does inventory turnover tell me?

It shows how often you sold your average stock in the period: €23,000.00 ÷ €11,000.00 = 2.09. Compare periods of equal length, and look at it per product, because a shop-wide figure hides the slow ones.

Is COGS the same as what I bought?

No. COGS is what the products you sold cost you. Stock you bought and still hold is an asset until it sells, so a month of heavy buying does not raise COGS by itself. In the example, €12,000.00 of the €35,000.00 available is still in stock.

Embed this calculator

Paste this script tag into your own page to show the calculator there, with the same maths and no sign-up. It fits the width of your page, resizes with the calculator and follows the visitor’s light or dark setting.

The script adds the calculator and a link to the full version under it. Keep the attribution link: it credits the calculator.

See which products earn their ad spend, and which don’t.

Product Metrics segments your products by advertising clicks and return against your target, then writes each segment to a Merchant Center label your campaigns use.

Analyse your products for freeLog in with Google, no credit card