Gross Margin
Gross margin is the percentage of revenue a company keeps after paying the direct costs of delivering its product or service, before sales, marketing and overhead.
Also called: gross margin, gross profit margin, GM, gross margin percentage
Gross margin is the percentage of revenue a company keeps after paying the direct costs of delivering what it sold. Those direct costs are called cost of goods sold, or COGS. Gross margin is the money left to fund sales, marketing, product and overhead. It is the first test of whether a business model can ever be profitable at scale.
How it works
The formula is simple:
Gross margin = (Revenue - COGS) / Revenue
The hard part is deciding what counts as COGS. A practical split:
- Above the line (COGS): hosting, data and API costs per customer, payment processing, support staff, onboarding and implementation staff, and any contractor work delivered to customers.
- Below the line (operating expenses): sales, marketing, research and development, finance, legal and rent.
For a services business, COGS is mostly the people doing the work. For ecommerce, it is the product cost, inbound freight and fulfillment. For SaaS, it is everything that scales with serving customers.
Gross margin feeds almost every other efficiency metric. Customer lifetime value should use gross profit, not revenue. CAC payback period divides acquisition cost by monthly gross profit per customer. Get gross margin wrong and those numbers are wrong too.
Example
A B2B software company reports a quarter like this (all numbers hypothetical):
| Line | Amount |
|---|---|
| Revenue | $1,000,000 |
| Hosting and infrastructure | $90,000 |
| AI model and data API costs | $110,000 |
| Support and onboarding team | $120,000 |
| Payment processing | $30,000 |
| Total COGS | $350,000 |
Gross profit is $650,000. Gross margin is 650,000 / 1,000,000 = 65%.
Now say the team moves the onboarding staff into "customer success" under operating expenses. Reported gross margin jumps to 77%. Nothing about the business changed. That is why investors and buyers ask exactly what sits in COGS before they trust the percentage.
A better fix is real: caching common model calls cuts API cost to $60,000, and self-serve onboarding trims support to $90,000. COGS drops to $270,000, and gross margin rises to 73% for honest reasons.
By company size
Small business: A restaurant, salon or agency lives on gross margin every week. For a restaurant it is food and labor cost against sales. For an agency it is contractor and staff hours against fees. One underpriced client or a supplier price hike shows up fast, so track it monthly at minimum.
Mid-market: Gross margin starts to vary by product line and customer segment. A company might run 80% on self-serve plans and 45% on enterprise plans with heavy implementation. We'd report margin by segment so pricing and packaging decisions reflect real delivery cost.
Enterprise: Margin becomes a board and valuation topic. Large companies watch margin trends across regions, cloud contracts and professional services. Small percentage moves matter, because a point of margin on a big revenue base is real money.
Gross margin vs contribution margin
People mix these up. Gross margin subtracts only the cost of delivering the product. Contribution margin also subtracts variable costs tied to each sale, like marketing spend per order, shipping and transaction fees. Gross margin tells you if the product is efficient to deliver. Contribution margin tells you if each additional sale actually makes money.
Why it matters for GTM teams
Gross margin sets the ceiling on what you can spend to win a customer. A company at 80% margin can afford a longer payback than one at 50%. We'd make sure every GTM model, from unit economics to channel budgets, uses gross profit. And we'd push back on growth plans that add low-margin revenue, like heavy custom services, without a plan to automate it. The LTV to CAC ratio only means something when margin is honest.
Common mistakes
- Using revenue instead of gross profit in LTV and payback math.
- Hiding support or onboarding costs below the line to flatter the margin.
- Ignoring AI and data API costs that grow with every new customer.
- Reporting one blended margin that hides a money-losing segment.
- Discounting heavily to close deals without checking margin on the final price.
- Comparing your margin to a different business model and drawing the wrong lesson.
FAQ
What is a good gross margin for SaaS?
A common rule of thumb is that pure software businesses aim for 70% to 80% or higher. Companies with heavy onboarding services, payments pass-through or large AI inference bills often run lower. Compare yourself to businesses with the same delivery model, not to the software average.
What is the difference between gross margin and gross profit?
Gross profit is a dollar amount: revenue minus cost of goods sold. Gross margin is that dollar amount divided by revenue, shown as a percentage. Gross profit tells you how much you have to fund the rest of the business, and gross margin tells you how efficiently you deliver.
What goes into cost of goods sold for a software company?
Usually hosting and infrastructure, third-party software and data costs tied to delivering the product, payment processing, customer support, and the onboarding or implementation team. Sales, marketing, product development and general overhead stay below the gross margin line. Be consistent, because moving costs across that line changes the number without changing the business.