Free Accounting Tool
COGS Calculator
Calculate Cost of Goods Sold using beginning + ending inventory and purchases. Add labor and overhead for manufacturers, plus revenue for gross margin and turnover.
Optional, leave 0 if you resell only
Optional, factory rent and utilities allocated to production
Adds gross margin and inventory turnover
Cost of goods sold
COGS for the period
$85,000.00
- Goods available for sale
- $105,000.00
- Less ending inventory
- $20,000.00
- Gross profit
- -$85,000.00
- Gross margin
- 0.00%
- Average inventory
- $22,500.00
- Inventory turnover
- 3.78
- Days of inventory on hand
- 97 days
COGS = Beginning inventory + Purchases (+ direct labor + overhead for manufacturers) − Ending inventory. Inventory method (FIFO, LIFO, weighted average) affects ending inventory and therefore COGS.
Frequently asked questions
What is the formula for cost of goods sold?
COGS = Beginning inventory + Purchases − Ending inventory. For manufacturers, you also add direct labor and allocated manufacturing overhead before subtracting ending inventory.
What is included in COGS vs operating expenses?
COGS only includes costs directly tied to producing or acquiring the goods you sold: raw materials, direct labor, freight-in, factory overhead. Indirect costs (sales salaries, office rent, marketing, R&D) belong in operating expenses, not COGS.
How does FIFO vs LIFO affect COGS?
FIFO (first-in-first-out) treats the oldest inventory as sold first; in inflationary periods this gives lower COGS and higher net income. LIFO does the opposite. Weighted average smooths between the two. Whatever method you choose, ending inventory is what changes; the COGS formula is the same.
What is inventory turnover?
COGS divided by average inventory. It tells you how many times you sold and replenished your inventory in a period. Industry medians vary widely: 8-12× is healthy in retail, 4-6× is typical in manufacturing, and 1-2× is normal for slow-moving specialty goods.
How do I get average inventory?
(Beginning inventory + Ending inventory) ÷ 2. For a more accurate measure, use the average of monthly or quarterly snapshots over the year, especially if inventory levels swing seasonally.
Why does COGS matter for taxes?
COGS reduces taxable revenue dollar-for-dollar on Schedule C, Form 1120, or 1120-S. Misclassifying purchases as inventory (or vice versa) shifts taxable income between years. The IRS scrutinizes large inventory write-downs and method changes, so be consistent and document well.
Sources
- IRS Publication 334: Tax Guide for Small Business
Chapter 6 shows Schedule C COGS lines: beginning inventory, purchases, labor, materials/supplies, other costs, ending inventory, and cost of goods sold.
- IRS Publication 538: Accounting Periods and Methods
Inventory accounting reference for identifying and valuing inventory and small-business inventory method rules.