Glossary
COGS (Cost of Goods Sold) — the direct costs attributable to the production of the goods a company sells during a period. It does not include indirect selling, administration, or distribution costs.
Gross Profit — Net Sales minus COGS. The profit before operating expenses. Gross Margin % = Gross Profit / Net Sales × 100.
Standard Cost — a pre-calculated cost for producing one unit, set at the start of each period using the Cost Estimate (CK11N in SAP). All goods issue postings use this standard.
Actual Cost — the real cost of production, calculated after the period ends by the Material Ledger (CKMLCP). The difference between standard and actual is the variance.
Goods Issue — the inventory movement in SAP (MIGO, movement type 601) that records goods leaving the warehouse when a delivery is made to a customer. This is the trigger for COGS posting.
Material Ledger — SAP's actual costing engine. It collects all price and quantity variances across the supply chain and revalues inventory and COGS from standard to actual cost at period end.
Cost of Goods Sold is the number that determines your gross margin. Get it wrong and every management report downstream is wrong. Understand it precisely and you can protect profitability at the product level, not just the company level.
This article explains COGS from first principles — the formula, what belongs in it and what does not, how SAP S/4HANA posts it automatically, and how Material Ledger closes the gap between standard and actual cost.
The COGS formula
COGS is not the cost of everything you made. It is the cost of what you sold.
COGS = Opening Stock + Purchases (or Production Cost) − Closing Stock
To see why this makes sense: if you started the month with ₹10 lakh of inventory, bought or produced ₹42 lakh more, and ended the month with ₹8 lakh still in stock — then you sold ₹44 lakh worth of inventory. That ₹44 lakh is your COGS.
| Amount | |
|---|---|
| Opening Inventory (1 May) | ₹10,00,000 |
| Add: Purchases | ₹40,00,000 |
| Add: Freight-in | ₹2,00,000 |
| Less: Purchase Returns | ₹(1,00,000) |
| Less: Closing Inventory (31 May) | ₹(8,00,000) |
| COGS | ₹43,00,000 |
The closing inventory is what remains unsold — it stays on the balance sheet as a current asset. Only the cost of what left the building as a sale becomes COGS on the income statement.
Q: Vajra Precision Tools Pvt Ltd, Pune starts April with ₹5 lakh of raw material. During the month they purchase ₹20 lakh more and use ₹18 lakh in production. Finished goods worth ₹15 lakh are sold. Closing finished goods: ₹3 lakh. What is COGS?
A: COGS = ₹15 lakh (finished goods sold). The raw material remaining (₹7L) and unsold finished goods (₹3L) both stay on the balance sheet. COGS is the cost of what was SOLD, not produced.
What is included in COGS
COGS covers all direct costs of production — costs that can be traced directly to a specific product:
Direct Materials — raw materials that physically become part of the finished product. For Vajra Precision Tools: steel billets, cutting inserts, coolant oil consumed in machining. In SAP, these are costed via the Bill of Materials (BOM) and valued using the material's standard price or moving average price.
Direct Labour — wages paid to workers who directly manufacture the product. The machining operator's salary, the assembly technician's wages, the quality inspector's time on the production floor. Not the factory manager's salary — that is indirect.
Manufacturing Overhead — indirect production costs that cannot be traced to a single product but are necessary for production:
- Factory building rent or depreciation
- Machine depreciation
- Factory supervisor salaries
- Electricity for the production floor
- Maintenance and repair of production equipment
- Factory insurance
Both variable overhead (increases with production volume) and fixed overhead (remains constant regardless of volume) are included in COGS for a manufacturing company.
What is NOT included in COGS
Many costs are wrongly included in COGS calculations. These belong below the gross profit line:
| Not in COGS | Where it belongs |
|---|---|
| Sales team salaries and commission | Selling & Distribution expenses |
| Marketing and advertising | Selling & Distribution expenses |
| Freight-out (shipping to customer) | Selling & Distribution expenses |
| Finance Director's salary | Administration expenses |
| Office rent, corporate overheads | Administration expenses |
| Interest on loans | Finance charges |
| R&D expenditure | Below operating profit |
The reason for this separation is analytical: gross margin tells you whether your core production is profitable. Mixing in selling or admin costs hides where the problem actually is.
COGS on the income statement
Net Sales ₹1,80,00,000
Less: Cost of Goods Sold ₹ 43,00,000
─────────────
Gross Profit ₹1,37,00,000 (Gross Margin: 76.1%)
Less: Operating Expenses
Selling & Distribution ₹ 12,00,000
Administration ₹ 8,00,000
─────────────
Operating Profit (EBIT) ₹1,17,00,000
A gross margin of 76% means Vajra keeps ₹76 of every ₹100 in sales after direct production costs. Whether the business is profitable overall depends on whether that ₹76 can cover operating expenses, interest, and tax.
For a manufacturing company in India, typical gross margins range from 30–60% depending on the sector. A gross margin falling year-on-year without a revenue increase signals a COGS problem — rising input costs, yield losses, or costing errors.
COGS for merchandising vs manufacturing companies
The formula is the same but the inputs differ:
Merchandising company (buys goods to resell — e.g. a distributor):
- COGS = Opening Inventory + Purchases − Closing Inventory
- No production. The cost is the purchase price plus freight-in and import duties.
Manufacturing company (produces goods — e.g. Vajra Precision Tools):
- COGS = Opening FG + Cost of Production − Closing FG
- Cost of Production = Direct Material + Direct Labour + Manufacturing Overhead
Most SAP implementations are for manufacturing companies where Cost of Production is itself a complex calculation — which is exactly what the standard cost estimate (CK11N) solves.
How SAP S/4HANA posts COGS automatically
In SAP, COGS is never posted manually. It is posted automatically when goods are issued against a sales delivery. Here is the exact flow:
Step 1 — Sales Order (VA01): Customer orders 500 units of precision component P-1001.
Step 2 — Delivery (VL01N): Warehouse picks 500 units. A delivery document is created.
Step 3 — Goods Issue (VL02N or MIGO, movement type 601): The warehouse posts the goods issue. At this exact moment, SAP posts two accounting entries:
DR: Cost of Goods Sold (G/L 500000) ₹4,37,500
CR: Finished Goods Inventory (G/L 200000) ₹4,37,500
The ₹4,37,500 = 500 units × ₹875 standard cost per unit (from CK11N).
Step 4 — Billing (VF01): The billing document posts revenue to the income statement. Now both sides of the margin are recorded.
The standard cost problem — and how Material Ledger solves it
When SAP posts COGS at goods issue, it uses the standard cost — the planned cost calculated at the start of the period. But real production rarely matches the plan exactly. Input prices change. Yield losses occur. Machine efficiency varies.
At the end of the period, the Material Ledger (transaction CKMLCP) runs the actual costing process:
- Collects all actual costs that hit the manufacturing cost centre during the period
- Compares actual to standard for each material
- Calculates variances (price, quantity, efficiency)
- Revalues inventory and COGS from standard to actual cost
Example:
- Standard cost: ₹875/unit × 500 units = ₹4,37,500 posted at goods issue
- Actual cost: ₹912/unit × 500 units = ₹4,56,000
- Revaluation adjustment: ₹18,500 additional COGS at period end
After CKMLCP runs, your COGS reflects what production actually cost, not just what you planned. This is the difference between standard costing (faster but approximate) and actual costing (accurate but requires period-end processing).
Q: Your standard cost estimate says ₹850/unit. During April, raw material prices increased and the actual cost was ₹910/unit. You sold 1,000 units. What is the Material Ledger revaluation amount?
A: Standard COGS = 1,000 × ₹850 = ₹8,50,000 (posted at goods issue). Actual COGS = 1,000 × ₹910 = ₹9,10,000. Material Ledger revaluation = ₹60,000 additional debit to COGS at period end.
Key SAP transaction codes for COGS
| Transaction | Purpose |
|---|---|
| CK11N | Create Standard Cost Estimate — sets the per-unit standard cost used for COGS posting |
| CK24 | Mark and Release Standard Cost — activates the estimate for the new period |
| MIGO | Goods Issue — triggers automatic COGS posting (movement type 601) |
| VL01N / VL02N | Outbound Delivery — picks goods and initiates goods issue |
| VF01 | Billing — posts revenue |
| CKMLCP | Material Ledger Actual Costing — revalues COGS from standard to actual |
| MB51 | Material Document List — shows all goods issue postings and their values |
| KE30 | CO-PA Report — shows COGS and margin by product, customer, or region |
Practical checklist — COGS health in SAP
Use this checklist every period-end:
- [ ] Standard Cost Estimate (CK11N) released for current period before first goods issue
- [ ] All goods issues posted with correct movement type (601 for sales, 261 for production)
- [ ] No goods issues posted at zero value (check MB51 for zero-value documents)
- [ ] Material Ledger closed (CKMLCP) before running CO-PA reports
- [ ] Gross margin report (KE30) reviewed for any product with negative gross margin
- [ ] COGS account in G/L reconciled to Material Document total (MB51 vs FBL3N)
Why COGS accuracy matters beyond accounting
COGS is not just an accounting entry. It drives real business decisions:
Product pricing: If your actual COGS is ₹910/unit but your standard says ₹850, you are pricing products based on a cost that does not exist. Every sale at the "standard" margin is actually less profitable than you think.
Product mix decisions: A gross margin report by product (KE30 in CO-PA) shows which products actually earn their keep and which destroy margin. Without accurate COGS, this analysis is meaningless.
Make-or-buy decisions: Comparing internal production cost vs. external purchase price requires accurate COGS. Standard cost errors lead to wrong make-or-buy conclusions.
Inventory valuation: COGS accuracy determines the value of closing inventory on the balance sheet. Understated COGS = overstated inventory = overstated profit — a material misstatement under both Indian GAAP and Ind AS.
Next in the SAP Costing Series: Real COGS vs Theoretical COGS — finding the hidden waste in your production costs.