Cost of Goods Sold (COGS) Calculator

Calculate cost of goods sold from beginning inventory, purchases and ending inventory (periodic inventory method).

$
$
Include freight-in and other costs of getting the goods ready to sell.
$
Subtracted from purchases to get net purchases.
$
From your physical count at the end of the period.

Results

Cost of goods sold
$80,000.00
Goods available for sale
$105,000.00
Net purchases
$85,000.00

Estimate only. This tool is for informational and educational purposes. Results depend on your inputs and simplifying assumptions, and are not a substitute for professional engineering, design or financial advice. Always verify with a qualified professional and applicable codes before purchasing, building or making decisions.

How it’s calculated

Under a periodic inventory system you don't track the cost of each sale. Instead, at the end of the period you count what is left, and everything else that was available is treated as sold.

Net purchases = Purchases − Returns, allowances & discounts Goods available for sale = Beginning inventory + Net purchases COGS = Goods available for sale − Ending inventory

Example: beginning inventory 20,000, purchases 85,000 and ending inventory 25,000. Goods available = 105,000, so COGS = 105,000 − 25,000 = 80,000.

The value you put on ending inventory (FIFO, LIFO, weighted average) changes COGS. IRS Publication 334 explains the rules for tax returns.

Frequently asked questions

Why does ending inventory reduce COGS?

Goods still on the shelf were not sold, so their cost stays on the balance sheet as an asset instead of becoming an expense.

Does COGS include shipping?

Freight-in (shipping to get goods to you) is part of inventory cost. Shipping goods out to customers is a selling expense, not COGS.

Embed this calculator

Add this free calculator to your own website. Copy the code below into your page’s HTML:

Sources

Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.

Spotted a mistake or missing option? Report a problem · GitHub issue· Suggest a calculator