Finance

Cost of Goods Sold (COGS) Calculator

Calculate cost of goods sold from beginning inventory, purchases, and ending inventory.


Cost of Goods Sold (COGS) Calculator

Advertisement

Find cost of goods sold (COGS) — the direct cost of the inventory a business actually sold during a period.

How it works

The formula is COGS = beginning inventory + purchases − ending inventory. Starting with $50,000 in inventory, buying $200,000 more, and ending with $40,000 left means $210,000 worth of goods were sold.

What this does not include

This calculates COGS from inventory values directly — it doesn’t break down COGS into its underlying components (raw materials, labor, overhead), which a manufacturing business’s internal accounting would track separately.

How to use this calculator

  1. Enter beginning inventory value.
  2. Enter purchases made during the period.
  3. Enter ending inventory value.

A worked example

Beginning inventory $50,000, purchases $200,000, ending inventory $40,000: COGS = 50,000 + 200,000 − 40,000 = $210,000.

Beginning inventory $10,000, purchases $80,000, ending inventory $15,000: COGS = $75,000.

What the variables mean

Variable Meaning
Beginning inventory Inventory value at the start of the period
Purchases New inventory purchased during the period
Ending inventory Inventory value remaining at the end of the period

Edge cases worth knowing

COGS reflects what was actually sold, not what was bought. Inventory that stayed on the shelf all period isn’t part of cost of goods sold — it’s still counted as ending inventory, and only the difference gets expensed.

A missing beginning inventory makes the calculation impossible, so the calculator declines to show a result without one.

Why does COGS increase when ending inventory decreases?

A lower ending inventory (relative to what you started with plus what you bought) means more inventory left the business as sold goods — the formula is simply accounting for where the inventory went.

Is COGS the same as total operating expenses?

No — COGS covers only the direct cost of the goods sold; other operating expenses like rent, marketing, and administrative salaries are tracked separately and aren’t part of COGS.

Why does COGS matter for gross profit?

Gross profit is revenue minus COGS, making COGS the first and often largest deduction in determining how profitable a company’s core sales actually are before other expenses are considered.

Important: This is general information, not financial advice. Figures are estimates, and your lender or provider decides the real numbers. Check with a qualified adviser before acting on them.

Be the first to rate this

Written by

M. Whitfield

Personal finance writer

M. Whitfield writes the personal finance calculators, covering loans, mortgages, savings, tax and investment maths. The focus is on showing exactly which number goes into a formula and which assumptions a result depends on, so readers can tell when a figure applies to their situation and when it does not. Every finance page states what it does not account for as plainly as what it does.

Reviewed by

A. Whitfield-Reyes

Calculator reviewer — finance

A. Whitfield-Reyes reviews the finance calculators, checking compounding conventions, rate-period alignment, and whether each page is explicit about the costs and tax treatment it leaves out. Financial results are easy to state with false precision, so review focuses on whether the page makes its assumptions visible to a reader who is not looking for them.

How we write and review

Related calculators