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

COGS = Beginning Inventory + Production Purchases − Ending Inventory. Indirect general expenses (rent, marketing) are excluded.

Results

Cost of Goods Sold (COGS)
₹6,30,000
Goods Available for Sale₹7,50,000
Gross Profit₹3,20,000
Gross Profit Margin33.7%
Total Manufacturing Additions₹6,00,000

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:

Goods Available for SaleTotal Additions = Purchases + Direct Labor + Factory Overhead
Available for Sale = Beginning Inventory + Total Additions
COGS & Gross ProfitCOGS = Goods Available for Sale − Ending Inventory
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 StepAmount% of RevenueAccounting Function
1. Beginning Inventory₹1,50,00015.79%Unsold inventory carried forward from prior period closing.
2. Add: Raw Material Purchases+₹4,50,00047.37%Direct inventory stock and raw components procured.
3. Add: Direct Labor Wages+₹1,00,00010.53%Assembly-line workers directly fabricating the product.
4. Add: Direct Factory Overhead+₹50,0005.26%Plant machinery electricity, machine lubrication, and packaging.
5. Goods Available for Sale₹7,50,00078.95%Total pool of physical inventory available for customer shipment.
6. Less: Ending Physical Inventory−₹1,20,00012.63%Physical count of unsold finished stock remaining in warehouse.
7. Cost of Goods Sold (COGS)₹6,30,00066.32%Direct manufacturing cost of units sold to buyers.
8. Gross Sales Revenue₹9,50,000100.0%Total top-line billings from product sales.
9. Resulting Gross Profit₹3,20,00033.68% MarginAvailable 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.
Unsure whether an expense belongs in Gross Margin or Operating Overhead?Read our accounting analysis on COGS vs. Operating Expenses (OPEX): Income Statement Classification, Gross Margin Impact, and SaaS Gray Areas to examine inventory capitalization, capitalized R&D rules, and EBITDA purity.

Frequently asked questions

What costs are excluded from COGS?
Operating expenses such as sales commissions, marketing and advertising, administrative legal fees, corporate office rent, and corporate executive salaries are operating expenses (OpEx), not direct manufacturing costs, and must be excluded from COGS.
How does inventory accounting method impact COGS?
In inflationary environments, FIFO (First-In, First-Out) yields lower COGS and higher reported gross profit, whereas LIFO (Last-In, First-Out) or Weighted Average Cost yields higher COGS and lower taxable income.
How is COGS calculated for a service business?
Service companies report Cost of Services (COS), which includes billable employee salaries, contractor fees, and direct software licenses required to deliver client deliverables, with zero physical inventory components.
What is the difference between direct labor and indirect labor?
Direct labor includes wages of employees directly assembling or fabricating products. Indirect labor includes plant supervisors, maintenance staff, and security guards, which are categorized as factory overhead.
Why is ending inventory subtracted in the COGS formula?
Under the matching principle, costs must be matched to revenues in the period earned. Goods remaining in ending inventory were not sold, so their costs are capitalized on the balance sheet rather than expensed in COGS.

Cost of Goods Sold

₹6,30,000