- In the example, a 70% AI margin across 200 customers hides 19 who lose $1,326 a month and run up 46.3% of the AI bill.
- Classic software gross margins sit near an 80% median (Aleph and Benchmarkit, FY2025); ICONIQ puts AI products at 45% for 2025.
- A plan limit with overage billed at twice AI cost lifts monthly contribution from $22,610 to $28,436 and leaves no customer underwater.
AI unit economics measure what each customer earns you after the AI cost that customer causes: revenue minus inference, payment fees and other variable costs, per customer, per month. Blended margins hide the losses. In the example in this guide, an AI product with 200 customers reports a 70% AI margin while 19 of those customers lose $1,326 a month between them.
Prices checked on November 27, 2026, from Anthropic's pricing page.
How unit economics work when every customer has an AI cost
Classic SaaS unit economics rest on one assumption: serving one more customer costs close to nothing, and it costs about the same for everyone. Under that assumption the price sets the margin, and CAC, payback and lifetime value can all run on one company-wide gross margin.
An AI product breaks that assumption. Every request a customer makes calls a model, and the provider bills you for the tokens. Two customers on the same $49 plan can cost you $4 and $72 in the same month, so each customer carries their own margin. The unit in AI unit economics is the customer, and below the customer sit the plan, the feature and the model.
Per-seat products have the same problem. Divide the AI bill by seats and you get an average cost per seat, while one seat running an agent all day can cost many times that average. Keep the average for trend lines, and work from the spread when you set prices and limits.
The example used in this guide
Example data. One AI product, an assistant for customer support teams, sells three monthly plans to 200 customers. It runs on Claude Sonnet 5.5 and bills through Stripe. Every number in the chapters below comes from this one product.
| Plan | Price | Customers | Monthly revenue |
|---|---|---|---|
| Starter | $49 | 120 | $5,880 |
| Growth | $199 | 60 | $11,940 |
| Scale | $799 | 20 | $15,980 |
| All | $169 average | 200 | $33,800 |
Example data. Monthly recurring revenue is $33,800. The month's AI bill for customer-facing features is $10,150.
The formulas for AI cost per customer and margin
Four numbers per customer, per month, cover most of the work. Normalize annual plans to monthly, and count usage or overage revenue in the month the customer earned it.
revenue per customer = subscription + usage or overage billed − recurring discounts
AI cost per customer = sum over that customer's calls of
input tokens × input price
+ output tokens × output price
+ cache writes × cache write price
+ cache reads × cache read price
AI margin = (revenue − AI cost) ÷ revenue
contribution margin = revenue − AI cost − payment fees − other variable costs
contribution margin % = contribution margin ÷ revenuePrice each call from its token counts at the rate for the model it used. On Claude Sonnet 5.5 that rate is $2 per million input tokens and $10 per million output tokens, with cache reads at $0.10. Our breakdown of Claude API cost per token walks through the per-call math for every current model.
Payment fees belong in the per-customer math because they scale with each charge. Stripe's standard rate for domestic cards is 2.9% plus 30¢ per successful charge. For Oakhurst, the example product's heaviest Starter customer, the contribution margin works out like this:
Oakhurst, Starter plan, one month revenue = $49.00 AI cost = $72.00 payment fee = 2.9% × $49 + $0.30 = $1.72 contribution margin = $49.00 − $72.00 − $1.72 = −$24.72 contribution margin % = −$24.72 ÷ $49.00 = −50.5%
Gross margin vs contribution margin
Gross margin is a company-level number: revenue minus cost of goods sold, divided by revenue. COGS includes delivery costs that don't move with any one customer, such as base hosting and the support team's salaries. Contribution margin subtracts only the costs that rise and fall with each customer, so you can compute it per customer, per plan and per feature.
Use gross margin for benchmarks, investors and the P&L. Use contribution margin per customer for pricing, plan limits and decisions about a single account. Spreading fixed COGS across customers to get a gross margin per customer adds an allocation choice to every row without changing which customers lose money.
| Line | Month | Share of revenue |
|---|---|---|
| Revenue | $33,800 | 100% |
| AI inference, customer-facing features | $10,150 | 30.0% |
| Hosting, vector database and monitoring | $2,400 | 7.1% |
| Production support and SRE | $3,900 | 11.5% |
| Gross profit | $17,350 | 51.3% |
Example data. Payment fees of $1,040 sit in G&A in this product's books, so they fall outside gross margin and inside contribution margin.
gross margin = ($33,800 − $10,150 − $2,400 − $3,900) ÷ $33,800 = 51.3% AI margin = ($33,800 − $10,150) ÷ $33,800 = 70.0% contribution margin = ($33,800 − $10,150 − $1,040) ÷ $33,800 = 66.9%
The three numbers answer three different questions. Gross margin compares you with other companies, AI margin isolates what the models cost you, and contribution margin tells you which customers and plans pay for themselves.
Payback when AI cost varies by customer
Many teams compute CAC payback on company gross margin. Per plan, contribution margin is the better input, because it carries that plan's own AI cost. In the example, the Growth plan costs $1,200 to win a customer and earns an average $130.43 a month in contribution.
CAC payback (months) = CAC ÷ monthly contribution margin per customer Growth plan average = $1,200 ÷ $130.43 = 9.2 months Birchline (Growth) = $1,200 ÷ −$47.07 = never
A customer with a negative contribution margin never pays back what you spent to win them. Each month Birchline stays on its current plan adds $47.07 to the loss.
What goes in AI COGS and what stays out
AI inference costs from customer-facing features belong in COGS. A customer's request triggers each call and the customer's usage scales it, the same as a server. Embeddings, the vector database that serves them and monitoring on production prompts belong there too. SaaS Capital's COGS guidance (October 2024) adds hosting, the staff who keep production running, retention-focused support and third-party software delivered inside the product.
Three kinds of AI spend stay out of COGS or need a written policy:
- Development and evals go to R&D. Give them their own API key, workspace or project, and the provider's cost reports split them for you.
- Employee AI tools, such as the chat seats your team uses to work, are operating expenses for the department that uses them.
- Free-tier usage is a policy choice. Keeping it in COGS shows the full cost of the product, and moving it to sales and marketing treats it as acquisition. Pick one and report free-tier inference as its own line.
In the example, $10,150 of inference sits in COGS and $570 of eval, development and playground usage sits in R&D. Our breakdown of SaaS COGS for AI products covers each line and the edge cases. Confirm the treatment with your accountant before you close the books on it.
SaaS gross margin benchmarks next to AI products
Classic SaaS gross margins sit around 80%. Companies that sell AI report lower numbers, and the gap grows with the share of revenue that goes to inference.
| Source and group | Period | Gross margin |
|---|---|---|
| SaaS Capital, SaaS license revenue | Published 2024 | 80% to 85% |
| Aleph and Benchmarkit, median software gross margin | FY2025 | 80% |
| Aleph and Benchmarkit, bottom quartile | FY2025 | 50% |
| Aleph and Benchmarkit, usage-only pricing, median | FY2025 | 62% |
| KeyBanc, companies spending under 2% of revenue on AI, median | 2025 | 78% |
| KeyBanc, companies spending over 5% of revenue on AI, median | 2025 | 66% |
| Bessemer, AI "Shooting Stars", average | 2025 | About 60% |
| Bessemer, AI "Supernovas", average | 2025 | About 25% |
| ICONIQ, companies building AI products, average | 2025 | 45% |
| ICONIQ, same group, projected | 2026 | 53% |
Source: SaaS Capital (October 3, 2024); Aleph and Benchmarkit 2026 report (published June 1, 2026, FY2025 actuals); KeyBanc Capital Markets AI x Software Benchmark (November 13, 2026); Bessemer State of AI 2025 (August 13, 2025); ICONIQ State of AI 2026 (July 2026).
The Aleph and Benchmarkit data covers 228 to 232 companies, and its median software margin held between 79% and 81% for four years. The authors could not prove that AI compresses margins and plan to isolate AI-native products in their next report. KeyBanc's 17th annual survey splits companies by AI spend instead, and finds a 12-point gap between the lightest and heaviest spenders.
The AI-native surveys show the range. Bessemer says many of its fastest growers, the "Supernovas", give up short-term profit to win distribution, with margins near zero or below. ICONIQ surveyed more than 300 executives and projects AI product margins rising to 59% in 2027. Two-thirds of its respondents report better per-query unit economics, crediting inference cost management and model routing.
The example product's 51.3% gross margin sits between ICONIQ's 2025 average and its 2026 projection. Its 70% AI margin measures something narrower, since it leaves out hosting and support, so compare it with your own history. Survey figures are self-reported averages under different COGS policies, so read small gaps with caution. The model providers' own margins are a separate question, covered in what the reported margins of OpenAI and Anthropic show.
One AI product, 200 customers: what the blend hides
Example data. Split the example product's customers by plan and the margins look tidy. Every plan clears 65% contribution margin, and Starter, the cheapest plan, earns the best AI margin at 75.2%.
| Plan | Customers | Average AI cost | AI margin | Contribution margin | Underwater |
|---|---|---|---|---|---|
| Starter, $49 | 120 | $12.17 | 75.2% | 71.7% | 10 |
| Growth, $199 | 60 | $62.50 | 68.6% | 65.5% | 7 |
| Scale, $799 | 20 | $247.00 | 69.1% | 66.1% | 2 |
| All | 200 | $50.75 | 70.0% | 66.9% | 19 |
Example data. Underwater means the customer's AI cost and payment fee exceed what they pay.
Sort the same 200 customers by their own contribution margin and four groups appear. Most of the base sits far above the blended number, and a small group sits far below zero.
| Contribution margin | Customers | Revenue | AI cost | Contribution |
|---|---|---|---|---|
| 80% and above | 127 | $20,473 | $2,030 | $17,811 |
| 60% to 80% | 36 | $6,264 | $1,980 | $4,092 |
| 0% to 60% | 18 | $3,582 | $1,440 | $2,033 |
| Below 0% | 19 | $3,481 | $4,700 | −$1,326 |
| All | 200 | $33,800 | $10,150 | $22,610 |
Example data. Contribution is revenue minus AI cost minus payment fees, summed per group.
Take those 19 customers out and the other 181 run at 78.9% contribution margin. The blended 66.9% describes almost no real account. The plan view hides the loss too: Scale's two heaviest customers lose $749 a month between them, and Scale still reports a 66.1% contribution margin.
Four ways to fix the 19 underwater customers
Each fix below changes the 19 underwater customers only, except the price rise, which changes every plan. The base case earns $22,610 a month in contribution, and every option assumes no customer cancels.
Example data. Monthly contribution after each fix, against a base of $22,610.
The plan limit wins because it ties each heavy customer's bill to their cost, which covers next month's heavy customers as well as this month's. The two cost fixes stack with it. Caching and a cheaper model lower the overage the heavy customers see, which makes the new bill easier to accept.
Customer profitability: who makes and loses money
Customer profitability analysis puts a name on each row. The six example customers below cover the range, one from each light group and one from each heavy group.
| Customer | Plan | Revenue | AI cost | Contribution | Margin |
|---|---|---|---|---|---|
| Ashby | Starter | $49 | $4 | $43.28 | 88.3% |
| Larkspur | Growth | $199 | $18 | $174.93 | 87.9% |
| Halden | Scale | $799 | $90 | $685.53 | 85.8% |
| Oakhurst | Starter | $49 | $72 | −$24.72 | −50.5% |
| Birchline | Growth | $199 | $240 | −$47.07 | −23.7% |
| Northwind | Scale | $799 | $1,150 | −$374.47 | −46.9% |
Example data. Contribution is monthly revenue minus AI cost minus the Stripe fee.
The losses follow one pattern: heavy usage on a flat price. Light customers on every plan clear 85%, so usage predicts margin better than the plan does. Northwind alone loses five times what Oakhurst and Birchline lose together, which is why you rank losses in dollars as well as percentages.
Break a losing customer down by feature and model
A customer's total tells you who loses money. The split by feature and model tells you what to change. Northwind's $1,150 breaks down three ways:
| Feature | Model | AI cost | Share |
|---|---|---|---|
| Auto-drafted replies (agent) | Sonnet 5.5 | $780 | 67.8% |
| Ticket summaries | Sonnet 5.5 | $250 | 21.7% |
| Search and embeddings | Embedding model | $120 | 10.4% |
| Total | $1,150 | 100% |
Example data. Northwind's AI cost for one month, by feature.
Summaries are short and repetitive, which makes them a candidate for a smaller model. The agent's drafts resend each ticket thread on every step, and repeated context is where prompt caching pays. You can only make either call with cost tagged by feature as well as by customer.
Lancelot's Margin intelligence shows margin per customer, plan, feature and model, from tracked usage and Stripe or RevenueCat revenue, and flags each customer who costs more than they pay. For the full method, from normalizing annual plans to ranking losses, see our step-by-step customer profitability analysis.
FinOps for AI: allocating cost and tying out the invoice
FinOps for AI applies cloud cost discipline to model spend. You allocate every dollar to the customer, feature and team that caused it, then prove the allocation adds up to the provider's invoice. The FinOps Foundation's FinOps for AI overview (updated October 28, 2026) says it's "hard to trace which application, feature, or agent consumed model output," because provider bills often lack native tagging.
The Foundation's answer is engineering instrumentation, plus unit metrics such as cost per inference, cost per million tokens and cost per successful outcome. For a company that sells AI, cost per customer is the unit that connects those metrics to revenue.
Allocate cost at the call
- Tag every production call with the billing customer ID and the feature. The provider's invoice has neither.
- Price from tokens at the rate for the model used, with cache reads, cache writes and batch discounts priced on their own rates.
- Separate non-customer usage by key. Development, evals and internal tools each get their own API key, workspace or project.
- Put untagged production cost in a shared line and allocate it by each customer's share of tagged cost. Set a threshold for that line, such as 2% of the bill, and fix the tagging when it passes.
Tie out to the provider invoice every month
Both major providers expose cost data to an admin key. Anthropic's Usage and Cost API reports cost by day, grouped by workspace or description, and usage by API key, workspace and model. OpenAI's costs endpoint groups daily cost by project, line item and API key. Compare those totals with your tracked cost before you close the month.
| Line | Month |
|---|---|
| Provider invoices, Anthropic and OpenAI | $10,720 |
| Tracked cost tagged to customers (COGS) | $10,150 |
| Eval and development workspace (R&D) | $430 |
| Console playground and internal tests (R&D) | $140 |
| Unexplained gap | $0 |
Example data. One month's tie-out for the example product.
unexplained gap = provider invoices − tracked customer cost − known non-COGS usage
= $10,720 − $10,150 − $430 − $140
= $0Anthropic's report leaves the API key ID empty for playground usage, so that spend needs its own non-COGS line. When a gap won't close, check three causes first: untagged calls, a model missing from your price table, and charges outside token pricing, such as Anthropic's web search at $10 per 1,000 searches.
Lancelot's Bill matching reads the OpenAI and Anthropic usage and cost reports daily with an admin key and explains each gap between them and its tracked cost.
How to improve AI margin: price, limits, models, caching
Four levers move AI unit economics. Two change revenue and two change cost. For a tail of heavy customers, tie revenue to usage first, then cut what the usage costs.
Raise prices
Starter $49 → $59, Growth $199 → $229, Scale $799 → $899 revenue $33,800 → $38,800 contribution $22,610 → $27,465 underwater 19 → 19 ($72 > $59, $240 > $229, $1,150 > $899)
A price rise lifts every customer's margin and fixes none of the 19, because each heavy customer still costs more than the new price. It also asks 181 profitable customers to pay more for a loss they didn't cause. Raise prices when the typical customer on a plan costs too much, and use the other levers for the tail.
Set plan limits and meter the overage
included AI usage: Starter $20, Growth $100, Scale $400 overage billed at 2 × AI cost above the included amount Oakhurst ($72 − $20) × 2 = $104 bill $153 contribution +$76.26 Birchline ($240 − $100) × 2 = $280 bill $479 contribution +$224.81 Northwind ($1,150 − $400) × 2 = $1,500 bill $2,299 contribution +$1,082.03
The limit leaves the other 181 bills unchanged, since none of those customers passes the included amount. The heavy customers' bills jump, Northwind's to almost three times its old price, so expect some of them to cut usage or leave. Both outcomes end the loss: if all 19 cancelled, monthly contribution would still rise by $1,326.
Our guide to AI pricing models compares flat, usage, credit and hybrid plans on one customer spread. Our post on usage-based pricing for AI covers how to meter the overage and keep the bill predictable.
Move routine calls to a cheaper model
On Anthropic's price list, Claude Haiku 5.5 costs $0.10 per million input tokens and $0.50 per million output tokens for prompts up to 100,000 tokens. That's one twentieth of Sonnet 5.5's $2 and $10. Opus 5.5 costs twice Sonnet 5.5, at $4 and $20.
heavy customers move 1/3 of their AI spend to Haiku 5.5, same token counts new cost = old cost × (2/3 + 1/3 × 0.05) = old cost × 0.683 Oakhurst $72 → $49.20 contribution −$1.92 Birchline $240 → $164.00 contribution +$28.93 Northwind $1,150 → $785.83 contribution −$10.30
In the example, a third of the heavy customers' traffic passed the team's quality checks on Haiku 5.5. The switch saves $1,488 a month and leaves 12 customers underwater. Run your evals before you move a feature, and give each customer a fallback model you've approved in advance. Our guide to cutting LLM costs covers routing in more depth.
Cache the context you send on every call
repeated context = 40% of heavy customers' AI spend (input tokens) Sonnet 5.5: cache read = 0.05 × input price, 5-minute cache write = 1.25 × input price at a 90% hit rate, cached context costs 0.9 × 0.05 + 0.1 × 1.25 = 0.17 of its old price saving = 40% × (1 − 0.17) = 33.2% of each heavy customer's AI cost Oakhurst $72 → $48.10 contribution −$0.82 Birchline $240 → $160.32 contribution +$32.61 Northwind $1,150 → $768.20 contribution +$7.33
Caching saves $1,560 a month on the 19 and leaves 10 underwater, all on Starter, where the price leaves the least room. Turn it on for every customer who resends large prompts and the saving grows, with no change to what the model returns. Anthropic's Batch API cuts input and output prices by 50% for work that can wait, such as nightly summaries.
Which lever fits your product
- Raise prices when the typical customer on a plan costs too much.
- Plan limits with overage when a small group of heavy users drives the loss.
- A cheaper model for short, repetitive tasks that pass your evals on it.
- Caching wherever large prompts repeat within five minutes, or within an hour on the 1-hour cache.
How to report AI unit economics to investors and the board
Boards and investors ask two things about an AI product: whether the margin holds as usage grows, and whether the number ties to the invoices. One page answers both if it shows the distribution, the trend and the tie-out.
| Metric | Example value | What it shows |
|---|---|---|
| Gross margin, AI inference in COGS | 51.3% | Comparison with benchmarks |
| AI margin, revenue minus AI cost | 70.0% | What the models cost you |
| AI cost as a share of revenue | 30.0% | The effect of pricing and model choices |
| Contribution margin | 66.9% | The input to payback |
| Customers below 0% contribution | 19 of 200 | The tail the average hides |
| Their share of AI cost | 46.3% | The size of the fix |
| CAC payback, Starter, Growth, Scale | 8.5, 9.2, 11.4 months | Each plan's own AI cost at work |
| Unexplained gap to provider invoices | $0 | Proof the allocation adds up |
Example data. Payback uses example acquisition costs of $300, $1,200 and $6,000 per customer.
Report each metric monthly with at least six months of trend, and state your COGS policy for free-tier usage, evals and internal tools in a footnote. An investor in diligence who finds inference booked in R&D may move it back into COGS, and the restated margin becomes the one in their model.
Put the distribution table next to the headline margin. A board can act on 66.9% with 19 customers underwater and a plan limit shipping next month. With 66.9% alone, the board can only ask questions.
For buyers and investors outside the boardroom, Lancelot's Verified margin badge publishes last month's AI gross margin, recalculated every hour from paid invoices and tracked AI cost, with percentages only and no customer names.
Questions about AI unit economics
What are AI unit economics?
AI unit economics measure the revenue and variable cost of each customer of an AI product, per month. The core number is contribution margin per customer: revenue minus AI inference, payment fees and other per-customer costs. In an AI product every customer carries a different margin, because usage sets their AI cost.
What is a good gross margin for an AI SaaS company?
Classic software medians sit near 80%, per the Aleph and Benchmarkit 2026 report. ICONIQ's 2026 survey put AI products at 45% in 2025, with 53% projected for 2026. KeyBanc found a 66% median for companies spending over 5% of revenue on AI. Track your own trend against those ranges.
What is the difference between gross margin and contribution margin?
Gross margin subtracts all cost of goods sold, including fixed delivery costs like hosting and support salaries, and works at company level. Contribution margin subtracts only the costs that rise with each customer, such as AI inference and payment fees, so you can compute it per customer, plan or feature.
Should AI inference costs go in COGS?
Yes, for customer-facing features. A customer's request triggers each call and their usage scales it, so inference is a delivery cost. Development, evals and employee AI tools belong in R&D or operating expenses. Free-tier usage is a policy choice, and you should report it as its own line either way.
How do I calculate AI cost per customer?
Tag every production model call with the billing customer ID, price each call from its token counts at that model's rates, including cache reads and writes, and sum by customer for the month. Then tie the total to your provider invoices so untagged or development usage doesn't distort the result.
What is FinOps for AI?
FinOps for AI applies cloud cost management to model spend. It allocates AI cost to the customers, features and teams that caused it, tracks unit metrics such as cost per inference or cost per customer, and reconciles the allocation with provider invoices every month.
How many unprofitable customers is too many?
Every customer with a negative contribution margin needs a fix, and the plan they sit on tells you which fix. As a guideline, a plan where 1 in 5 customers is underwater, or where the typical customer costs 60% or more of the price, is priced too thin.
Is cost per seat a good metric for AI products?
Cost per seat works as a trend line and fails as a pricing input. AI usage per seat spans a wide range: in this guide's example, the heaviest Starter customer costs 18 times the lightest. Price against the spread of cost per customer, and watch how many customers pass your plan's included usage.






