Guides / ai saas gross margin calculator
An AI SaaS gross margin calculator, and the inputs it needs
An AI SaaS gross margin calculator needs four inputs: revenue for the period, model spend, the share of that spend serving customers, and infrastructure that scales with usage. Most teams have the first and guess the rest. Culpa, a local-first LLM cost, margin, and forecast ledger, reconciles metered spend against revenue you import, so the middle two stop being estimates.
Why this happens
The same month yields three different margins depending on how you cut it, and all three are correct. Blended margin tells you whether the business works. Margin per plan tier tells you which plan works. Margin per customer tells you which accounts work. Teams report the first, make decisions that only the second and third can answer, and end up defending a healthy blended figure while their fastest-growing tier loses money on every new logo.
What this usually looks like
- Board reporting carries one gross margin number and no breakdown behind it.
- The tier sales pushes hardest has never had its margin computed separately.
- Model spend and revenue live in systems nobody has joined, so margin gets assembled by hand each quarter.
- Blended margin looks stable across a period when the mix underneath it moved a long way.
Free, no card, no account
Run the free Cost Leak Scan
It shows your most expensive conversation before you install anything.
Mistakes that cost the most
| Mistake | Why it hurts | Do instead |
|---|---|---|
| Reporting only blended gross margin. | A blend hides a loss-making tier behind a profitable one, and growth then makes the problem bigger. | Compute margin per tier and per account as well, and treat the blend as a summary rather than a finding. |
| Leaving usage-scaling infrastructure out of the cost line. | Vector storage, embedding refreshes and egress all grow with usage, so margin reads high by whatever they cost. | Include every cost that moves with usage, and keep fixed platform costs out so the line stays comparable. |
| Computing margin once a quarter. | Model mix and provider rates both move monthly, so a quarterly figure describes a period already gone. | Recompute monthly against a dated price book, and watch the trend rather than the level. |
Run this check tonight
- Write down revenue and model spend for last month, then compute the blend. That's your starting point, not your answer.
- Split both sides by plan tier and compute margin for each. The spread will be wider than expected.
- Check what share of model spend is customer-serving rather than evaluation or internal work.
- Add every infrastructure cost that grows with usage, then recompute. Note how far the number moved.
- Find the tier with the lowest margin and check whether it's the one your sales team is compensated to sell.
One month, three tiers, three very different answers
Illustrative example
A product on GPT-5.4 at real rates of $2.50 per million input and $15.00 output. Customer counts, plan prices and per-customer token volumes below are modelled.
The blended 64.8% sits between three tiers that behave nothing alike, and the worst of them at 27.9% is the one with the biggest logos and the loudest growth story.
Every number, with its confidence and source
| Figure | What it means | Confidence | Source |
|---|---|---|---|
| 27.9% to 79.3% | modelled gross margin spread across three plan tiers in the same month | estimated | Each tier computed at real GPT-5.4 rates per million from the price book, effective 2026-07-02. A range because customer counts and token volumes are modelled. |
| $10,905 | modelled total monthly model spend across all three tiers | calculated | $2,400 + $4,185 + $4,320 from the teardown arithmetic at real GPT-5.4 rates. |
What a generic answer can’t know
Margin needs revenue and model spend joined on the same object, whether that object is a tier or an account. No provider holds your revenue and no billing system holds your token counts, so the join has to happen somewhere both are reachable. Culpa does it on your infrastructure, keeps your prompts and responses there, and counts the calls to run your plan.
Questions founders ask next
What belongs in the cost line of an AI gross margin calculation?
Model spend for customer-serving traffic, retries included, plus any infrastructure that scales with usage such as vector storage and embedding refreshes. Fixed platform costs and evaluation runs belong elsewhere, or the line stops being comparable month to month.
Why does margin per tier differ so much from blended margin?
Because usage per customer varies far more than price per customer. A tier priced at seventeen times another can carry sixty times the model spend, so the blend describes an average customer who exists nowhere in your base.
How often should gross margin be recomputed?
Monthly. Model mix drifts, prompts grow and provider rates change on dates you don't control, so a quarterly figure is usually describing conditions that stopped applying weeks before anyone read it.
On your infrastructure
Culpa runs on your infrastructure. Your prompts and responses never leave it. Culpa counts calls to run your plan, and it fails open, so if it ever breaks your app keeps running.
How Culpa works
Find the culprit. Not just the total.
Your dashboard shows what you spent. It stops short of who spent it. Culpa shows the conversation, the user and the feature behind it.
Your prompts stay local.
Culpa runs on your own infrastructure. What you send to a model reaches us at no point.
Every dollar has a name.
Follow any charge to the conversation, the user, the feature and the customer behind it.
See the bill before it lands.
Cost your next feature before you ship it. You get the likely bill and the worst case, at best, median, p90 and p99.
Three steps to your first answer.
Change one base URL.
Or drop in the Python or TypeScript library.
Find your most expensive conversation.
In the first session, not the first week.
Cost your next feature before you ship it.
Why the bill went up
Example dashboardCalls traced
418,209
across 3 projects
Spend this week
$378.41
+ $182 vs last week
Failed calls
312
74% retried, and you paid for all of them
+ $182 this week traced to one culprit
Spend over 14 days
Most expensive users
Next week forecast
Graded against reality. Accuracy shown as results land.
Free, no card, no account
Run the free Cost Leak Scan
It shows your most expensive conversation before you install anything.
Keep reading
Sources: OpenAI API pricing. Last reviewed 2026-08-01. Plain text version.