How the Cost of Goods Sold calculator works
Cost of goods sold
COGS = Beginning inventory + Purchases + Direct labor + Other direct costs − Ending inventory
Inventory turnover and days of inventory
Turnover = COGS ÷ ((Beginning + Ending inventory) ÷ 2); Days = Days in period ÷ Turnover
Worked example
A store starts the year with $50,000 of inventory, buys $120,000 more and pays $10,000 in freight to bring it in. At year end it counts $40,000 still on the shelves. The cost of goods sold is $140,000.
With $250,000 in sales, gross profit is $110,000, a 44% gross margin. Inventory turned over 3.11 times, so the average item sat for about 117 days before it sold.
Why ending inventory matters
Ending inventory is subtracted, so counting it accurately matters. Overstating it makes COGS look lower and profit look higher than it is; understating it does the opposite. Count inventory at the same time each period and value it the same way.
From COGS to profit
COGS is the second line of the income statement. Subtract it from revenue for gross profit, then subtract overhead for operating profit. The profit calculator takes those next steps, and the profit margin calculator checks the margin on a single product.
Turnover and cash
Slow-moving inventory ties up cash that could pay bills or fund growth. If days of inventory keep climbing, consider smaller, more frequent orders, discounting slow sellers with the discount calculator, or dropping products that rarely sell.
Assumptions and limits
- Inventory is valued the same way at the start and end of the period, for example at cost under FIFO.
- Purchases are net of returns and discounts and exclude items taken for personal use.
- Overhead such as rent and office salaries is not part of COGS; it belongs in operating expenses.
Frequently asked questions
How do you calculate cost of goods sold?
Add beginning inventory, purchases and other direct costs to get the goods available for sale, then subtract ending inventory. What's left is the cost of the inventory you sold during the period.
What goes into cost of goods sold?
The direct cost of what you sold: products bought for resale, raw materials, freight to bring them in, and for manufacturers, direct labor and factory costs. Selling, marketing and office costs are not included.
Where does COGS go on a tax return?
Sole proprietors report it in Part III of Schedule C, and corporations and partnerships use Form 1125-A. The calculation follows the same steps as this calculator.
What is a good inventory turnover?
It depends on what you sell: grocery stores turn inventory many times a year, while furniture or jewelry stores turn it slowly. Rising turnover usually means less money tied up in stock.
Sources and method
- About Form 1125-A, Cost of Goods Sold · Internal Revenue Service
- Publication 334, Tax Guide for Small Business · Internal Revenue Service
Formulas and figures checked against these sources on November 11, 2026. The calculator runs entirely in your browser; nothing you type is sent to us or stored. Results are estimates for education, not financial, tax or legal advice, and MonyPulse is not a lender, tax preparer or investment adviser. Found an error? Tell us. See how we build and test our calculators and our editorial standards.