Logo

Small Business calculator

Cost of Goods Sold (COGS) Calculator

Enter what you had in stock at the start, what you bought and what is left. The calculator works out the cost of what you sold and the gross profit on your sales.

Reviewed November 2026

Your numbers

$

Last period’s ending inventory, at cost.

$

Goods and materials bought for resale during the period.

$

Shipping, duties and handling to get goods to you.

$

Wages of people who make the product. Leave at 0 if you only resell goods.

$

$

From a physical count or your inventory records, at cost.

Sales

$

Cost of goods sold

$212,000*

Gross profit of $188,000, a 47.0% gross margin.

Cost of goods sold78%
Ending inventory22%
Beginning inventory$50,000
Net purchases and direct costs$222,000
Goods available for sale$272,000
Less ending inventory– $60,000
Cost of goods sold$212,000
Gross profit$188,000
Gross margin47.0%
COGS as a share of revenue53.0%
Inventory turnover3.85×

*Estimate based on the figures you entered. Actual results depend on your full situation. This is not tax, legal or financial advice.

Want exact numbers for your situation?

A uTaxes CPA or enrolled agent can review it with you. The first consultation is free.

Book a consultation

How this calculator works

Goods available for sale is beginning inventory plus purchases, freight-in and direct labor, minus purchase returns and discounts. Cost of goods sold is that total minus ending inventory: whatever was available and is no longer on the shelf is treated as sold.

Gross profit is revenue minus cost of goods sold, and gross margin is gross profit divided by revenue. Inventory turnover is cost of goods sold divided by the average of beginning and ending inventory.

The formula assumes every missing unit was sold, so theft, spoilage and counting errors end up in cost of goods sold. It also depends on how you value ending inventory, for example first-in first-out or average cost. Use the same method every period.

Related tools

Common questions

Short answers to what people ask most about this topic.

What is included in cost of goods sold?

The direct costs of the products you sold: the purchase price of goods or raw materials, freight and duties to bring them in, and, if you make the product, the wages of production workers and factory overhead.

Costs of selling and running the business are not included. Marketing, office rent, administrative salaries, shipping to customers and payment processing fees are operating expenses.

Do service businesses have cost of goods sold?

Often not. A consultant, designer or bookkeeper who sells time has no inventory, so there is nothing to count at year end and no cost of goods sold in the strict sense.

Many service firms still track a cost of services or cost of revenue line, covering subcontractors, billable staff wages and materials used on jobs. It is useful for measuring gross margin by job even where no inventory exists.

Why does ending inventory matter for taxes?

Because it sets cost of goods sold. Overstating ending inventory lowers cost of goods sold and raises taxable profit this year; understating it does the opposite. The error then reverses next year, when the same figure becomes beginning inventory, so profit is shifted between years.

Businesses under the small-business gross receipts threshold may be allowed to use simplified inventory methods instead of full inventory accounting. Which method fits depends on your facts, so confirm it with your tax preparer before changing how you count.

Talk to uTaxes

Want a professional to run your numbers?

Our CPAs and enrolled agents handle tax filing, bookkeeping and payroll for individuals and small businesses. The first consultation is free.

Keep exploring

All resources

This page is general information, not tax, legal or financial advice. Tax rules change and depend on your situation; talk to a qualified professional before acting on it.