COGS Calculator

Calculate cost of goods sold (COGS) from beginning inventory, purchases, and ending inventory. COGS is the direct cost of the products you sold in a period — the first deduction on your income statement and the foundation of gross profit.

$
$
$
Cost of Goods Sold
$70,000.00
Goods Available for Sale
$100,000.00
Inventory Change
$5,000.00

What Is COGS?

Cost of goods sold (COGS) is the direct cost of the inventory you sold during a period. It is the first line item subtracted from revenue on the income statement. Gross profit = revenue − COGS.

COGS only includes costs directly tied to the products you sold. Rent, admin salaries, marketing, and bank fees are operating expenses — not COGS. This distinction matters because COGS determines gross margin, while operating expenses determine operating margin.

COGS Formula

COGS = Beginning Inventory + Purchases − Ending Inventory

Beginning inventory + Purchases is called goods available for sale — the total cost of everything you could have sold. Subtract what is still on the shelf (ending inventory) and you have the cost of what you actually sold.

Worked Example

A retailer starts the year with $25,000 in inventory, buys $75,000 of new stock, and ends the year with $30,000 on hand:
Goods available for sale = $25,000 + $75,000 = $100,000
COGS = $100,000 − $30,000 = $70,000
Inventory change = $30,000 − $25,000 = +$5,000 (inventory grew)
If revenue was $100,000, gross profit = $100,000 − $70,000 = $30,000, and gross margin = 30%.

What Counts as COGS

Not COGS: office rent, administrative salaries, marketing spend, software subscriptions, bank fees, insurance, depreciation of office equipment. These are operating expenses and belong below the COGS line.

Frequently Asked Questions

What is the difference between COGS and operating expenses?

COGS is the direct cost of producing or buying the products you sold. Operating expenses are the indirect costs of running the business — rent, admin salaries, marketing, insurance. COGS is subtracted first to get gross profit; operating expenses are subtracted next to get operating profit.

What is the difference between COGS and inventory?

Inventory is what is still on the shelf — an asset on the balance sheet. COGS is what has been sold — an expense on the income statement. When you sell a unit, its cost moves from inventory to COGS.

Does COGS include shipping?

Inbound freight (shipping to your warehouse) is normally included in COGS because it is a direct cost of acquiring the goods. Outbound freight (shipping to customers) is often treated as an operating expense or as part of COGS depending on your accounting policy — be consistent either way.

Does COGS include labour?

Only direct labour tied to production — factory workers building the product, or a service technician delivering the service directly. Administrative and sales salaries are operating expenses.

How does inventory valuation affect COGS?

The method used to value inventory — FIFO, LIFO, or weighted average — affects both ending inventory and COGS. In rising prices, FIFO gives lower COGS and higher profit; LIFO gives higher COGS and lower profit. The method must be applied consistently and disclosed in your financial statements.

What if COGS is higher than revenue?

If COGS exceeds revenue, gross profit is negative — you are selling products below cost. That is unsustainable unless it is a deliberate loss leader. Check for inventory errors (overstated purchases or understated ending inventory) before concluding the product is genuinely unprofitable.

Related Tools