Glossary / COGS
COGS(Cost of Goods Sold)
Cost of goods sold (COGS) is the direct cost a business incurs to produce the goods or services it sells. COGS includes raw materials, direct labor, and direct production overhead — but excludes indirect costs like marketing, rent, or executive salaries. COGS subtracted from revenue gives gross profit.
Formula
COGS = Beginning inventory + Purchases during period - Ending inventory (for product businesses)
Example
A retail business starts the quarter with $20,000 in inventory, buys $50,000 more during the quarter, and ends with $25,000. COGS = $20,000 + $50,000 - $25,000 = $45,000. If revenue was $100,000, gross profit is $55,000 (55% gross margin).
Why it matters
COGS is the foundation of gross margin and pricing analysis. Knowing COGS by product line tells you which products subsidize others and which are pulling profit down.
Related terms
See COGS on your own data
DashViz auto-tracks COGS from your CSV and Excel exports today — native Stripe, QuickBooks, and Shopify connectors are on the roadmap. 14-day free trial, no credit card.