COGS Calculator
Calculate cost of goods sold using the inventory method, or build up per-product cost from components.
COGS formula · Product cost builder · Gross profit · Margin analysis
COGS Calculator
Inventory Method
Product Cost Builder
$
Value of inventory at start of period
$
Inventory bought or manufactured during period
$
Value of inventory remaining at end of period
$
Optional — enables gross profit calculation
Reference
Gross margin benchmarks by industry
| Industry | Gross Margin | Key Cost Drivers |
|---|
FAQ
COGS questions answered
What is the COGS formula?
COGS = Beginning Inventory + Purchases − Ending Inventory. If you started with $10K inventory, bought $40K more, and ended with $8K, your COGS is $42K. This represents the direct cost of what was actually sold during the period — not what was purchased.
What is included in COGS?
Direct costs only: raw materials, purchased goods for resale, direct labor (production workers), manufacturing overhead (factory rent, equipment depreciation), and inbound freight. Not included: marketing, sales salaries, admin overhead, office rent, or R&D.
What is a good gross margin?
It varies by industry: Software/SaaS 70–90%, Service businesses 40–70%, Retail 20–50%, Restaurants 60–70% (food cost 28–35% is the target), Manufacturing 20–40%. If your margin is below your industry benchmark, either raise prices or reduce COGS.
COGS vs operating expenses — what's the difference?
COGS = direct cost to produce/purchase what you sell. Operating expenses (OpEx) = everything else to run the business. Gross Profit = Revenue − COGS. Operating Profit = Gross Profit − OpEx. Keep them separate on your income statement — mixing them makes it impossible to analyze product profitability.