Gross Margin vs Net Margin: A Startup Founder's Guide
Gross margin vs net margin comes down to which costs you count. Gross margin is the share of revenue left after the direct cost of serving customers. Net margin is the share left after every cost of running the company. If you have read our post on the difference between revenue and profit for a startup, this is the next step. That post shows first-time founders why a sales number alone can mislead them, and it explains how to calculate revenue and profit and why AI founders should watch margins, burn and runway. This article splits profit into its two most useful margins.
Age of AI Entrepreneur teaches this kind of business arithmetic in short hands-on lessons, written for people building with AI. The numbers below are the ones you would use to check whether your own product can pay for itself.
Gross margin vs net margin in one minute
Both margins are percentages of revenue. They differ in how much cost you subtract first.
- Gross margin subtracts only the cost of revenue: what it costs to deliver the product to each customer. It tells you if the product itself makes money.
- Net margin subtracts everything: cost of revenue, plus marketing, tools, contractors, salaries and other operating costs. It tells you if the whole company makes money.
A product can have a healthy gross margin and a negative net margin. That is common early on. The reverse is a warning sign: if gross margin is thin or negative, selling more makes things worse.
What gross margin measures and how to calculate it
Gross margin answers one question: when a customer pays you, how much is left after you pay to serve them?
The steps:
- Take your revenue for a period, such as one month.
- Subtract the cost of revenue for the same period. The result is gross profit.
- Divide gross profit by revenue and multiply by 100.
In short: gross margin = (revenue - cost of revenue) / revenue.
Use the same period for both numbers. Mixing a full year of revenue with one month of costs gives a figure that means nothing.
What net margin measures and how to calculate it
Net margin answers a wider question: after paying for everything, what share of each dollar did the company keep?
Start from gross profit, subtract your operating expenses (marketing, software tools, contractors, salaries including your own if you pay it, and any other overhead), and add or subtract any other items such as interest or taxes. What remains is net profit. Then:
net margin = net profit / revenue
Net profit can be negative. A negative net margin means you lost money in that period. For a young company this is normal if you can afford it for long enough, which is what runway measures. More on that below.
A worked example with a small AI product
These numbers are made up to show the arithmetic. Say you run a small AI tool that summarizes customer calls for coaches. In one month:
- Revenue: $2,000 from subscriptions.
- Model API fees: $380.
- Hosting for the app: $70.
- Payment processing fees: $90.
- Design contractor: $700.
- Marketing: $400.
- Software tools: $160.
Cost of revenue is the API, hosting and payment fees: $380 + $70 + $90 = $540. Gross profit is $2,000 - $540 = $1,460. Gross margin is $1,460 / $2,000 = 73%.
Operating expenses are the contractor, marketing and tools: $700 + $400 + $160 = $1,260. Net profit is $1,460 - $1,260 = $200. Net margin is $200 / $2,000 = 10%.
Now suppose next month your users start sending much longer calls, and model fees climb to $900 while everything else stays the same. Cost of revenue becomes $900 + $70 + $90 = $1,060. Gross profit falls to $940, so gross margin drops to 47%. Net profit is $940 - $1,260 = -$320, so net margin is -16%.
Revenue did not change. Usage did. That is the main reason AI founders need to watch gross margin: your cost of serving a customer can move with how much they use the product, not just with how many customers you have.

What counts as cost of revenue for an AI startup
The line between cost of revenue and operating expense is a judgment call, but a practical rule works: if the cost rises when a customer uses the product, it probably belongs in cost of revenue. If you would pay it even with zero customers, it is probably an operating expense.
Typical cost of revenue for an AI product:
- Model API fees, billed by tokens in and out of each request.
- Hosting and compute used to serve customers.
- Per-use charges from other services your product calls, such as a data or search provider.
- Payment processing fees.
- Support time spent directly on customers, if you track it.
Typically operating expenses instead: building the product, marketing, general software tools, and your own pay.
Model fees deserve extra attention because they depend on prompt length, output length and how many calls one task needs. The lesson "Model APIs, Tokens and What a Request Costs" in the AI Product Stack course covers how to estimate what one request costs. Sign in to open the course. Agents can multiply this cost, because a loop that retries or calls tools many times makes many model calls for one task. Our note on why AI agents fail and the guardrails that help explains how those loops go wrong.
What a good margin looks like at the early stage
There is no single right number, and any figure quoted without a source for your type of product is a guess. A few principles hold up well:
- Gross margin should be positive and steady as usage grows. If it falls whenever customers use the product more, your pricing and your costs are fighting each other. Fix that before spending on growth.
- Compare gross margin to what you need to cover. Gross profit has to pay for marketing, tools and people. If it cannot, no amount of volume solves it.
- Net margin is often negative early. That is acceptable only if you know how many months you can sustain it.
- Track the trend, not one month. A single month can be distorted by an annual payment, a one-off bill or a spike in usage.
Pricing is the lever that most directly changes gross margin, along with choosing a smaller or cheaper model where quality allows. If you can run the product with fewer people, net margin improves too, which is the theme of our playbook on how to scale a startup without hiring.
How margins connect to revenue, profit, burn and runway
These five numbers describe one business from different angles.
- Revenue is what customers pay you.
- Gross margin shows how much of it survives the cost of delivery.
- Net margin shows how much survives everything.
- Burn is how much cash you lose per month when you are not profitable.
- Runway is how many months your cash lasts at that burn:
runway = cash in the bank / monthly burn.
Back to the example. In the bad month you lost $320. If you have $6,400 in the bank and keep burning $320 a month, you have about 20 months of runway. That is a comfortable cushion. But if usage keeps climbing and the loss grows, the runway shrinks. Gross margin is the early warning, because it moves first.
One caution: net margin is an accounting view, and burn is a cash view. If a customer pays for a year up front, your cash rises now, while the revenue you report may be spread over twelve months. Watch both.
Frequently asked questions
Is gross margin or net margin more important for a startup?
Look at gross margin first, because it shows if the product can earn money at all. Then look at net margin and runway to see if the company can survive while it grows.
Can net margin be higher than gross margin?
Not in the usual case. Net profit is gross profit minus operating costs, so net margin is at most the gross margin, unless you have other income such as interest.
Do model API costs count in gross margin?
Yes, for most AI products. Fees that rise with customer usage are direct costs of delivering the product, so they belong in cost of revenue.
Is a negative net margin always bad?
Not always. Many young companies lose money while they build, but you should know your burn and how many months of runway you have at that rate.
How often should I calculate my margins?
Monthly is a sensible rhythm for a small product. Compare each month with the last few so you spot trends rather than reacting to one odd month.
Get started
Start with your own numbers. Write down last month's revenue, list each cost, sort them into cost of revenue and operating expenses, and calculate both margins. If you want the groundwork first, read the post on the difference between revenue and profit for a startup. Then sign in to Business Basics for Builders, where the lesson "Revenue, Costs and Unit Economics" goes through this kind of arithmetic.
Start Age of AI Entrepreneur: short hands-on lessons on how to build a business in the age of AI, with the sources listed in every lesson. You sign in with your email and an emailed code.
Building a business in the age of AI, from a first project to a company.
Visit aientrepreneur.vlvd.net↗


Comments
No comments yet.
Sign in or make an account to comment.