पाठशाला Pathshala · हिसाब Hisāb, Unit economics · Lesson 08 · Start

What belongs in COGS: the cost of revenue, drawn correctly

Gross margin is only as honest as the line drawn under cost of revenue. Which costs sit above it, which below, and how an investor’s analyst will redraw yours in the first week of diligence.

Pathshala, The Founder Library · 11 October 2026 · 7 min read

Rows of black server racks and cabling stand in a lit data centre aisle.
Photograph: Brett Sayles · Pexels

Gross margin is the first number an investor reads and the easiest one for a founder to flatter, because the founder decides which costs sit above the line. Put only the servers there and a software company shows ninety per cent. Put the support team, the onboarding engineers, the model inference bill and the payment fees there too, as an analyst will, and the same company may show fifty-six. The difference is not a matter of opinion. It is a matter of drawing the line the way everyone who reads the number expects it to be drawn.

This lesson gives the rule, applies it to the costs founders most often misplace, shows why Indian statutory accounts will not draw the line for you, and ends with a quarterly check that keeps the classification honest. The figure in the middle lets you classify one company and see how far your margin moves.

The rule: deliver and support versus build, sell and run

Cost of revenue is every cost incurred to deliver and support what a customer has already bought. Andreessen Horowitz’s 16 Startup Metrics puts it in one sentence: the contents of gross profit vary by company, but all costs associated with the manufacturing, delivery and support of a product or service should be included, and the founder should be ready to explain what is in and what is out. Everything else is operating expense, which falls into three families: research and development, which builds the product the customer will buy next year; sales and marketing, which wins revenue; and general and administrative, which runs the company.

One test resolves most cases. If the company stopped acquiring customers and stopped building features tomorrow, but kept serving the customers it has, would this cost continue? If yes, it is delivery and belongs in COGS. If it would stop, it is building or selling and belongs below the line. A cost that is partly both, an engineer who spends a third of the week on production incidents, is split by time and the split is written down.

The five costs founders put on the wrong side

Hosting. Production hosting is COGS; the development and staging environments are R&D. Most cloud bills mix the two, so tag accounts or projects by environment from the first month. SaaS Capital’s guidance on SaaS COGS adds the people who keep production running, the infrastructure or DevOps team, and excludes the rest of engineering.

Support and customer success. The support desk is delivery. Customer success is COGS when its job is retention, satisfaction and helping customers use what they have bought, and sales and marketing when its job is renewals, upsell and expansion; SaaS Capital draws exactly that line. Many Indian SaaS teams combine the two in one role, in which case split the salary by time spent.

Payment fees. The gateway fee is incurred on every sale and is a cost of collecting revenue, so the delivery test puts it above the line. Some companies carry it in G&A. Either is defensible if disclosed; carrying it below the line without saying so is not.

Implementation and onboarding. The engineers who configure, migrate and train a new customer are delivering a service. Bessemer’s Scaling to $100 Million lists hosting, implementation and services costs including customer success as typical COGS. SaaS Capital goes further and recommends reporting implementation revenue and its costs separately from subscription revenue, because they are a different business with a different margin. Do both: keep the costs above the line and show the two margins apart.

Model inference and third-party services. Every API call the product makes on a customer’s behalf, a language model, an SMS gateway, a WhatsApp Business message, a KYC check, a maps lookup, is a cost of delivering the product. Martin Casado and Matt Bornstein’s The New Business of AI found AI companies often running 50 to 60 per cent gross margins against a 60 to 80 per cent-plus benchmark for comparable SaaS, with 25 per cent or more of revenue often spent on cloud resources. Bessemer notes the same effect for pass-through costs: Twilio ran near 50 per cent because it paid telecom carriers through COGS. A low margin from pass-through costs is a fact about the business. Hiding it below the line is a fact about the founder.

One company, classified twice

A Bengaluru company sells workflow software with an AI assistant to mid-sized Indian manufacturers and books ₹50 lakh a month of revenue, ex-GST. Its ledger shows ₹4 lakh of production hosting, ₹3 lakh of model inference, ₹1 lakh of payment fees, ₹2 lakh of SMS and WhatsApp messages sent on customers’ behalf, ₹5 lakh for the support team, ₹4 lakh for onboarding, ₹3 lakh for DevOps, ₹15 lakh for the engineers building new features, ₹1 lakh of staging cloud, ₹3 lakh for account managers, ₹2 lakh of commissions and ₹3 lakh of rent and administration.

The deck shows hosting and payment fees as COGS, ₹5 lakh, and a gross margin of 90 per cent. The analyst’s version carries ₹22 lakh, and the margin is 56 per cent. Nothing about the company changed between the two numbers; only the line moved. At 56 per cent the company sits below the 65 to 70 per cent cloud average Bessemer reports, and the right conversation is about how inference and onboarding costs fall with scale. At 90 per cent, discovered to be 56 in week one, the conversation is about whether anything else in the deck can be trusted.

Start from the deck’s classification and move each line to where you think it belongs, then show the analyst’s reasons. The point is not that 56 per cent is bad. It is that a founder should arrive at 56 per cent first, explain it, and show the plan that moves it.

Why Indian books will not draw the line for you

A founder who opens the statutory profit and loss statement looking for gross margin will not find it. Schedule III to the Companies Act, 2013 presents expenses by their nature, under heads that Taxmann’s Schedule III checklist lists as cost of materials consumed, purchases of stock-in-trade, changes in inventories, employee benefits expense, finance costs, depreciation and amortisation, and other expenses. The support team, the onboarding team and the engineers building new features all sit together inside employee benefits expense; the production cloud bill and the office internet sit together inside other expenses. The statutory format is correct for its purpose. It does not answer the question an investor asks.

So build a management P&L by function alongside the statutory one. Tag every ledger head and every employee to a function, using cost centres or reporting tags in the accounting software, write the rule for each in a one-page policy, and reconcile the management P&L to the statutory total every month so that nothing goes missing. Two Indian details matter. Revenue and costs are both ex-GST, and GST paid on an input that is claimed as input tax credit is not a cost at all; GST that cannot be claimed is. And a cost that arrives once a year, an annual software licence or an insurance premium, is spread across the months it covers, or the margin will swing for no reason.

The founder chooses where the line is drawn only once. After that the analyst draws it, and the only question is whether the two lines agree.

Physical products and marketplaces

For a company that sells goods, COGS is the landed cost of what was sold: materials or purchase price, inbound freight, duties that cannot be recovered, manufacturing labour and the packaging that is part of the product. Outbound shipping, payment fees, returns and the warehouse are variable costs of each order that many analysts carry in a second cut below gross margin, which is why the [contribution margin](/library/contribution-margin-first-number-to-know) lesson exists. A marketplace that earns a commission records the commission as revenue and carries the costs of facilitating the transaction, payment processing, the support for buyers and sellers, any logistics it funds, as its cost of revenue. In every case the discipline is the same: define the line once, write it on the slide, keep it.

A delivery rider on a motorbike moves through a wet city street in India in the rain.
Delivery is part of what the customer bought. Where its cost sits is a choice to define once and keep. Photograph: Avisekh Samanta · Pexels

The quarterly COGS audit

Once a quarter, after the books for the third month are closed, spend an hour on five questions. Has any new vendor appeared in the ledger, and which side of the line is it on? Has anyone’s role changed, a support lead who now runs renewals, an engineer who now carries the production pager, so that their time split is wrong? Is the cloud bill still tagged by environment, or has an untagged project crept in? Are inference and messaging costs growing faster than revenue, and if so per customer or per unit of usage? And does the management P&L reconcile to the statutory one to the rupee?

Record any change in the one-page policy with the date and the reason, and restate the previous quarters if the change is material, so that the trend in gross margin reflects the business and not the bookkeeping. An investor will forgive a margin that is lower than hoped. A margin that changed definition between two decks is harder to forgive. The [gross margin](/library/gross-margin-why-investors-fixate) lesson explains why the number carries so much weight once it is drawn correctly.


Nothing here is legal, tax or investment advice. Classification choices for statutory accounts are for your chartered accountant; the management P&L described here sits beside them, not in place of them.

Sources

  1. Jeff Jordan, Anu Hariharan, Frank Chen and Preethi Kasireddy, 16 Startup Metrics, Andreessen Horowitz, August 2015 — All costs of manufacturing, delivery and support belong in gross profit; be ready to explain what is in and out.
  2. Randall Lucas, What Should be Included in COGS for My SaaS Business in 2025?, SaaS Capital, October 2024 — Hosting, DevOps, retention-focused support and success, and third-party software in COGS; account management, upsell, commissions and other R&D excluded; implementation reported separately.
  3. Mary D’Onofrio, Ethan Ding and Atlas editors, Scaling to $100 Million, Bessemer Venture Partners, September 2021 — Hosting, implementation and services including customer success as typical COGS; 65–70 per cent average cloud gross margin; Twilio near 50 per cent on pass-through costs.
  4. Martin Casado and Matt Bornstein, The New Business of AI (and How It’s Different From Traditional Software), Andreessen Horowitz, February 2020 — AI gross margins often 50–60 per cent against a 60–80 per cent-plus SaaS benchmark; 25 per cent or more of revenue on cloud.
  5. Taxmann, Ind AS Schedule III Checklist: Presentation and Disclosure of Expenses in the Financial Statements, July 2023 — Expense heads on the face of the statement of profit and loss under Schedule III.