Your privacy choices

We use essential storage to remember your settings. With your permission, Google AdSense may use cookies to serve and measure ads. Privacy Policy.

COGS

Calculate the cost of goods sold from inventory and purchases for a period.

Built and maintained by The NumberPrism Editorial TeamEditorial policy

Your details

Results update as you type. The formula and assumptions are explained below the calculator.

Cost of goods sold

$170,000.00

Goods available for sale$210,000.00
Closing inventory$40,000.00
COGS as share of revenue56.7%
Gross profit$130,000.00

Estimate only, for a periodic inventory system. Freight-in and duty should be included in purchases; write-downs and returns need separate adjustment.

Share calculator

Use this tool

Embed

How to calculate COGS

Roll opening stock through purchases to closing stock.

1

Enter opening inventory

Use the closing balance from the previous period.

2

Add purchases

Include freight-in and duty that are part of inventory cost.

3

Subtract closing inventory

Use a consistent cost valuation for the closing count.

What does this tool do?

Cost of goods sold is the cost of the inventory that was sold during a period. The periodic method adds purchases to opening stock and subtracts closing stock, which ties the balance sheet to the income statement.

The Formula

COGS = Opening inventory + Purchases − Closing inventory

Frequently Asked Questions

What should be included in purchases?

Include goods bought for resale plus freight-in, duty and non-recoverable purchase taxes. Exclude operating costs such as marketing, rent and admin.

Why can closing inventory not exceed goods available?

Goods available is everything that could be sold. A higher closing balance would imply negative COGS, which usually signals a data or valuation error.