The Line Between COGS and Operating Expense Isn't as Fixed as It Looks
In a hurry? Skip straight to the numbers.
Open the Gross Profit Calculator →Gross profit math is simple - revenue minus COGS - but the harder, less-discussed question is what actually belongs in COGS in the first place, and the answer isn't as fixed as most people assume.
Why Classification Is a Judgment Call, Not a Fixed Rule
Accounting standards give companies real discretion in deciding whether certain costs belong in cost of goods sold or further down the income statement as an operating expense. A factory's direct materials and direct labor are unambiguous COGS. But costs like warehouse management, quality control staff, or a portion of shipping and fulfillment can reasonably be classified either way depending on a company's own accounting policy - and because gross profit is calculated directly from COGS, that classification choice directly shapes the gross margin a company reports, even though the underlying economics of the business haven't changed at all.
Why SaaS Companies Are a Particularly Instructive Case
Software-as-a-service businesses show this ambiguity especially clearly in their "cost of revenue" line, which typically includes hosting/cloud infrastructure costs and customer support staff directly tied to serving paying customers. Where the line gets blurry is items like customer success teams focused on retention versus pure support, or engineering time split between maintaining existing infrastructure (arguably COGS) versus building new features (arguably R&D, an operating expense). Two SaaS companies with genuinely identical unit economics can report meaningfully different gross margins purely because one classifies its customer success team as cost of revenue and the other classifies the same function as a sales and marketing operating expense.
A Practical Reading Habit
Rather than comparing gross margin figures across companies at face value, check the "significant accounting policies" footnote (or the cost of revenue breakdown, if disclosed) for what specifically is included - especially when comparing a company against industry peers or its own historical trend after an accounting policy change. A sudden jump in gross margin between one fiscal year and the next, with no obvious change in pricing or supplier costs, is a common signal that a reclassification between COGS and operating expenses happened, rather than a genuine improvement in the underlying business.
| Cost type | Common classification | Where it gets debated |
|---|---|---|
| Direct materials/labor | COGS | Rarely debated - clearly a direct cost |
| Warehouse/fulfillment staff | Often COGS, sometimes opex | Company-specific policy choice |
| Cloud hosting (SaaS) | Cost of revenue | Allocation between customer-serving and R&D use |
| Customer success/support | Split between COGS and opex | Depends on retention vs. pure support framing |
Using This When You Analyze Gross Profit
When gross profit or gross margin is the deciding factor in a comparison between two businesses, confirm the two companies are actually drawing the COGS line in a similar place before treating the comparison as apples-to-apples - the underlying cash economics may be nearly identical even when the reported margins look quite different.
Ready to Put This Into Practice?
Now that you understand how it works, plug in your own numbers and get an instant, accurate result.
Use the Gross Profit Calculator Now →