Free tools · Profit & cash

Cost of goods sold calculator

Work out your cost of goods sold from your inventory counts and purchases, then see your gross margin and how fast your stock turns over.

← All free tools

Your numbers

$

At cost, usually last period's closing count.

$

Net of returns and supplier discounts.

$

Shipping, duties and fees to get stock to you (not shipping to customers).

$

If you make or assemble what you sell.

$

At cost, from your count.

$

Cost of goods sold

$146,000

$196,000 available to sell, less $50,000 still on hand

Gross margin

51.3%

Gross profit $154,000

Inventory turnover

3.2 times

About 113 days of stock on hand on average

How the cost of goods sold is built

Starting inventory$40,000
+ Purchases$150,000
+ Freight-in$6,000
+ Direct labor$0
- Ending inventory$50,000
LineAmount
Starting inventory$40,000
Add purchases$150,000
Add freight-in$6,000
Add direct labor$0
Goods available for sale$196,000
Less ending inventory-$50,000
Cost of goods sold$146,000

Everything you type stays in your browser: nothing is sent to us or saved.

How this works

The formula is simple: starting inventory + purchases + costs to get stock in − ending inventory = cost of goods sold. Whatever you had or bought, minus what's still on the shelf, must have been sold (or lost, which is worth knowing too).

Count freight-in, import duties and, if you make what you sell, direct labor as part of the cost. Shipping to customers, rent and marketing don't belong here: they're operating expenses.

Add your revenue and the calculator shows gross profit and gross margin. Inventory turnover divides COGS by your average inventory, and days in inventory turns that into how many days of stock you carry on average. Fewer days means less cash sitting on shelves.

The result is only as good as the ending count. If you don't count stock, or count it at retail price instead of cost, COGS and every margin built on it will be off.

Questions people ask

Do service businesses have cost of goods sold?

Many call it cost of revenue or cost of services: the direct cost of delivering the work, such as contractor fees or the time of staff who do client work. The inventory formula here suits businesses that buy or make products.

Is shipping to customers part of COGS?

Shipping costs to get stock to you (freight-in) usually are. Shipping to customers is often treated as a selling expense, though some businesses include it in cost of sales. Pick one approach and use it every month.

How often should I count inventory?

At least at year end for your tax return. Monthly or quarterly counts, or a system that tracks stock as you buy and sell, give you margins you can trust during the year.

What's a good inventory turnover?

It varies a lot by what you sell: groceries turn over far faster than furniture. Track your own number over time; a falling turnover often means slow-moving stock is piling up.

Sources

Rates and rules checked on November 17, 2026.

This tool gives estimates for general information, not tax, legal or accounting advice for your situation. Talk to us or your CPA before acting on the results.

Related tools

Ready for books you can trust?

Book a free 30-minute consultation. We'll review where your finances stand today and show you exactly how we'd help.