Included:
- Raw materials and components
- Direct labor (for manufacturing)
- Manufacturing overhead (factory costs directly tied to production)
- Freight-in (shipping to receive inventory)
Not included (operating expenses):
- Sales and marketing costs
- Administrative salaries
- R&D expenses
- Interest and taxes
COGS and Gross Margin
Gross Margin = (Revenue - COGS) / Revenue × 100
Gross margin is the primary indicator of pricing power and business model efficiency. Compare across time periods and competitors within the same industry.
COGS for Service Businesses
Service businesses don't have physical inventory but still have COGS — it's called Cost of Revenue (CoR) or Cost of Service. Includes direct labor hours billed to clients, contractor costs, and hosting/infrastructure for SaaS.
COGS (Cost of Goods Sold) is the direct cost of producing the goods a business sold during a period. It equals beginning inventory plus purchases minus ending inventory, and is deducted from revenue to calculate gross profit.
Cost of Goods Sold (COGS) represents the direct costs attributable to the goods sold by a company during a specific period.
Physical goods businesses:
- Raw materials
- Packaging
- Direct labor (workers directly producing the goods)
- Manufacturing overhead (depreciation of production equipment, factory utilities)
- Inbound freight
SaaS and software (called Cost of Revenue):
- Cloud hosting and infrastructure
- Support team directly serving customers
- Third-party API costs per transaction
- Implementation and onboarding costs
Misclassifying operating expenses (like sales salaries) as COGS inflates gross margin and understates operating leverage. Investors and acquirers look closely at COGS composition, especially in SaaS — overstated gross margin is a common red flag in M&A diligence.
COGS vs Operating Expenses — What's the Difference?
COGS (Cost of Goods Sold) covers direct production costs; operating expenses cover indirect costs like sales, marketing, and admin. Both reduce profit, but COGS is subtracted first to show gross profit.
The distinction between COGS and operating expenses (OpEx) shapes how investors evaluate a business's unit economics.
If pre-sale or general: OpEx. If post-sale fulfillment for SaaS: COGS
Cloud hosting (SaaS)
COGS
Cost incurred per customer served
R&D
OpEx
Future product, not current delivery
Why the Distinction Matters for Investors
High gross margin (low COGS ratio) signals pricing power and scalable unit economics. Operating expenses can be cut in a downturn; COGS is harder to reduce without cutting quality or volume. Investors compare gross margin first, operating margin second.
SaaS businesses don't have inventory, but they still have a COGS equivalent — Cost of Revenue. Here's exactly what belongs in it and what doesn't.
SaaS companies don't manufacture physical goods, so "Cost of Goods Sold" can feel like
the wrong term entirely — most SaaS income statements use Cost of Revenue instead,
covering the direct costs of delivering the software to customers.
What belongs in SaaS Cost of Revenue
Hosting and infrastructure: cloud compute, storage, bandwidth directly tied to
running the product for customers
Third-party APIs and licensed data: any per-use or per-seat cost passed through
from a vendor your product depends on
Customer support: support and success staff, when their role is delivering the
product rather than selling it
Payment processing fees: Stripe/PayPal fees on subscription charges
Implementation/onboarding staff: for products with hands-on setup, the direct
delivery cost of getting a customer live
What does NOT belong in Cost of Revenue
Sales and marketing salaries and spend
R&D and product development (new feature work, not running existing features)
G&A — finance, HR, legal, executive salaries
Sales commissions
A common mistake is putting all engineering cost into Cost of Revenue. Only the portion
directly tied to running the live product for existing customers belongs there — new
feature development is R&D, an operating expense below the gross margin line.
Why the SaaS gross margin benchmark is so high
Because Cost of Revenue for software is mostly hosting and support — a small fraction of
revenue at scale — SaaS gross margins of 70–85% are normal, versus 20–50% for businesses
with physical COGS. This is the mechanical reason SaaS valuation multiples are typically
higher than product businesses: more of every new dollar of revenue flows to gross profit.
Frequently asked questions
Does customer success count as Cost of Revenue or Sales & Marketing?
It depends on the role. Success staff focused on renewal/expansion selling are often
classified with Sales & Marketing; those focused on onboarding and support are Cost of
Revenue. Some companies split a single CSM role's cost proportionally.
How should AI/inference costs be classified for AI products?
As Cost of Revenue — inference cost scales directly with usage, the same way hosting
costs do, and is a direct cost of delivering the product per customer interaction.
Use the COGS Calculator to compute gross profit and margin
once you've correctly classified your Cost of Revenue components.