Cost of Goods Sold Calculator
Calculate COGS and gross margin with a simple inventory formula.
Inputs
Results
Updates instantlySend your request or a correction and we'll review it within 24 hours.
You can also use the Feedback button in the bottom-right corner.
| Line item | Amount | Role in the formula |
|---|---|---|
| Beginning inventory | $12,000 | Inventory available at the start of the period. |
| Purchases | $45,000 | Additional inventory or production cost during the period. |
| Ending inventory | $9,000 | Inventory not sold, subtracted from available goods. |
| COGS | $48,000 | Beginning inventory plus purchases minus ending inventory. |
About This Calculator
COGS = Beginning Inventory + Purchases - Ending Inventory.
Use the result to compare gross margin across products, periods, or inventory methods. A rising COGS percentage can point to supplier cost increases, shrinkage, discounting, or production inefficiency.
Keep the period consistent when you enter inventory and purchases. If beginning inventory is from the first day of the quarter, ending inventory should be from the last day of that same quarter, and purchases should include only inventory bought during that quarter. Mixing annual purchases with monthly inventory balances will make gross profit and margin unreliable.
For management reporting, compare COGS as a percentage of revenue over time. If revenue grows but gross margin falls, review supplier pricing, freight, waste, discounts, returns, and the inventory costing method used by your accounting system. The calculator gives a quick operating view; formal tax or financial statements should still follow your accounting policy.
About This Calculator
Calculate Cost of Goods Sold (COGS) using beginning inventory, purchases, and ending inventory. Analyze gross profit margins, track production costs, and optimize pricing strategy for your business.
Frequently Asked Questions
What is cost of goods sold?
Cost of goods sold is the direct cost of inventory or production for goods sold during a period. It excludes overhead that is not tied directly to goods sold.
What formula does the COGS calculator use?
COGS = beginning inventory + purchases - ending inventory. Gross profit equals revenue minus COGS, and gross margin equals gross profit divided by revenue.
Why is ending inventory subtracted from COGS?
Ending inventory is inventory still on hand, so it was not sold during the period. Subtracting it leaves the cost of the goods that actually generated revenue.
The SuperCalc Editorial Team maintains calculator interfaces, formula notes, examples, and supporting explanations. Methods, assumptions, source links, and review depth vary by calculator and are documented on the relevant page where available.