Cost of Goods Sold (COGS)
Calculate inventory flow costs and direct production expenses incurred to generate revenue.
Value of stock carried over from prior financial quarter or year
Total inventory purchases made during the period
Assembly & manufacturing wages
Packaging & plant utilities
Stock remaining at period close
Gross revenue earned
Standard Accounting Rule
Results
Direct line item deducted from revenue on corporate income statements.
How Cost of Goods Sold is calculated
Cost of Goods Sold (COGS) measures the direct expenditures incurred to manufacture, purchase, or package products that were successfully sold to customers during an accounting period:
Available for Sale = Beginning Inventory + Total Additions
Gross Profit = Sales Revenue − COGS
Gross Margin % = (Gross Profit ÷ Sales Revenue) × 100
The Matching Principle: Under accrual accounting (GAAP & IFRS), inventory costs remain on the balance sheet as an asset until the goods are actually sold, at which point they are expensed on the income statement as COGS to match sales revenue.
Step-by-step worked example
Consider a manufacturing business with the default baseline parameters: beginning stock of ₹1,50,000, raw material purchases of ₹4,50,000, direct manufacturing wages of ₹1,00,000, factory overhead of ₹50,000, ending physical inventory of ₹1,20,000, and sales revenue of ₹9,50,000:
| Cost Flow Step | Amount | % of Revenue | Accounting Function |
|---|---|---|---|
| 1. Beginning Inventory | ₹1,50,000 | 15.79% | Unsold inventory carried forward from prior period closing. |
| 2. Add: Raw Material Purchases | +₹4,50,000 | 47.37% | Direct inventory stock and raw components procured. |
| 3. Add: Direct Labor Wages | +₹1,00,000 | 10.53% | Assembly-line workers directly fabricating the product. |
| 4. Add: Direct Factory Overhead | +₹50,000 | 5.26% | Plant machinery electricity, machine lubrication, and packaging. |
| 5. Goods Available for Sale | ₹7,50,000 | 78.95% | Total pool of physical inventory available for customer shipment. |
| 6. Less: Ending Physical Inventory | −₹1,20,000 | 12.63% | Physical count of unsold finished stock remaining in warehouse. |
| 7. Cost of Goods Sold (COGS) | ₹6,30,000 | 66.32% | Direct manufacturing cost of units sold to buyers. |
| 8. Gross Sales Revenue | ₹9,50,000 | 100.0% | Total top-line billings from product sales. |
| 9. Resulting Gross Profit | ₹3,20,000 | 33.68% Margin | Available gross contribution to cover SG&A and taxes. |
Cost Models: Retail vs. Manufacturing vs. Services
- Retail & Merchandising: Simple formula: Beginning Inventory + Purchases + Inbound Freight − Ending Inventory. No labor or factory overhead.
- Manufacturing: Incorporates 3 distinct inventory accounts: Raw Materials, Work-in-Progress (WIP), and Finished Goods, factoring in machine depreciation.
- Professional Services & SaaS: Reported as Cost of Services (COS) or Cost of Revenue. Includes cloud server hosting (AWS/Azure), third-party API costs, and billable engineering salaries, with zero physical inventory.
Costs That Must Be EXCLUDED From COGS
Mistakenly including operational overhead in COGS distorts gross margins:
- Selling Expenses: Google/Meta advertising, sales commissions, outbound customer shipping, and marketing team payroll.
- General & Administrative (G&A): Corporate headquarters lease, executive C-suite salaries, legal retainers, and audit fees.
- Financing Costs: Bank overdraft interest and corporate income tax deductions.
Assumptions & Inventory Valuation Limitations
- Inventory Valuation Method Sensitivity: During inflationary cycles, FIFO (First-In, First-Out) reports lower COGS and higher taxable income, whereas Weighted Average Cost smooths pricing surges. (Note: LIFO is banned under IFRS and Indian AS 2).
- Shrinkage, Breakage & Theft: Unrecorded inventory theft or warehouse damage artificially increases reported COGS because ending inventory count comes in lower than accounting records predict.
- Periodic vs. Perpetual Inventory Systems: This calculator models the periodic inventory method where COGS is established after a physical inventory count at period close.
Frequently asked questions
What costs are excluded from COGS?
How does inventory accounting method impact COGS?
How is COGS calculated for a service business?
What is the difference between direct labor and indirect labor?
Why is ending inventory subtracted in the COGS formula?
Related calculators
Break-even Calculator
Calculate the break-even point in units and revenue for any fixed and variable cost structure.
BusinessProfit Margin Calculator
Calculate gross, operating, and net profit margins from revenue and cost inputs.
BusinessInventory Turnover & Days (DSI)
Calculate inventory turnover ratio and Days Sales of Inventory (DSI/DIO) to measure supply chain velocity.
Cost of Goods Sold
₹6,30,000