Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Cost of Goods Sold
$11,000
for the accounting period
Beginning Inventory $10,000
Purchases $5,000
Goods Available for Sale $15,000
Ending Inventory $4,000

What Is Cost of Goods Sold (COGS)?

Cost of Goods Sold (COGS) represents the direct costs of producing or purchasing the goods a business sold during an accounting period. It includes the cost of raw materials and merchandise but excludes indirect expenses like distribution, marketing, and overhead. COGS is subtracted from revenue to calculate gross profit, making it one of the most important figures on an income statement.

How to Use This Calculator

Enter three values: your beginning inventory (the value of stock at the start of the period), purchases (inventory or materials bought during the period), and ending inventory (the value of stock left at the period's end). The calculator instantly returns your COGS along with goods available for sale.

The Formula Explained

The COGS formula is: $$\text{COGS} = \text{Beginning Inventory} + \text{Purchases} - \text{Ending Inventory}$$ The logic is simple: take everything you had available to sell (opening stock plus new purchases), then subtract what's still on the shelf at the end. Whatever's missing must have been sold — that's your cost of goods sold.

Diagram showing beginning inventory plus purchases minus ending inventory equals COGS
COGS equals beginning inventory plus purchases minus what remains as ending inventory.

Worked Example

Suppose a retailer starts the quarter with $10,000 in inventory, buys $5,000 more during the quarter, and ends with $4,000 in inventory. $$\text{COGS} = 10{,}000 + 5{,}000 - 4{,}000 = \$11{,}000$$ Goods available for sale were $15,000, of which $4,000 remained, leaving $11,000 sold.

Inventory flow from beginning stock through purchases to goods sold and ending stock
Goods flow in as purchases and out as sales, leaving the ending inventory.

FAQ

Does COGS include shipping or labor? Direct labor and freight-in to acquire inventory are typically included; selling and administrative costs are not.

What if COGS comes out negative? A negative result usually means ending inventory exceeds beginning inventory plus purchases — double-check your figures, as it often signals a data entry or valuation error.

How does inventory method affect COGS? FIFO, LIFO, or weighted-average methods change how inventory values are assigned, which can alter beginning and ending inventory and therefore your COGS.

Last updated: