Cost of Goods Sold (COGS) Calculator
Calculate cost of goods sold with the inventory formula — beginning inventory plus purchases minus ending inventory — and your gross margin.
Calculate cost of goods sold with the inventory formula — beginning inventory plus purchases minus ending inventory — and your gross margin.
Results
About This Calculator
Enter inventory at the start and end of the period, what you bought, and direct costs of getting goods ready to sell (production labor, freight-in). COGS is the cost of the goods you actually sold.
Example
Example: $40,000 of opening stock, $150,000 of purchases and $20,000 of direct costs make $210,000 available for sale. With $35,000 left at the end, COGS is $175,000 — on $300,000 of revenue, a 41.67% gross margin.
Assumptions
This tool provides general estimates for informational purposes only and isn't financial, accounting, tax or legal advice. Results depend on the figures you enter — check them against your own accounts, or ask an accountant or financial adviser before making business decisions.
Frequently Asked Questions
What is included in COGS?
Direct costs of the goods sold — materials or purchase cost, direct labor, and freight to get them in. Rent, marketing and office costs are operating expenses, not COGS.
Related Calculators
About the Author

Professional SEO, Digital Marketer Specialist
I am a Certified Google Ads Expert And Professional SEO, Digital Marketing Specialist
View full profile