Free calculator

AI Cost Calculator: LLM Cost per Customer and Margin

What does the AI feature do to your gross margin? Enter your token usage, model prices and plan price to see AI COGS, cost per customer, margin before vs after AI, and the exact lever, price up or cost down, to hold your target margin.

Your AI plan

$
$
$
%
%
%
Gross margin after AI
-
AI COGS / mo
-
AI cost / customer
-
AI as % of revenue
-
GM before AI
-
Inference efficiency
-
Heavy user (2.5x)
-

How AI cost turns into margin

The chain is simple and unforgiving. Cost per request = (input tokens ÷ 1M × input price) + (output tokens ÷ 1M × output price). Multiply by requests per customer per month, subtract any saving from caching or routing to a cheaper model, and you have AI COGS per customer. That lands on the same P&L line as hosting and support, so your gross margin is revenue minus non-AI COGS minus AI COGS, all over revenue.

The number that catches founders out is the heavy user. A flat average hides them: if a power user runs 2.5x the requests, their AI cost can pass what they pay you, and a handful of them drag the whole cohort's margin down. That is why the calculator shows the 2.5x band, not just the mean.

Worked example: a $49 AI plan

A SaaS product sells an AI plan to 1,000 customers and runs a mid-priced model with a 20% caching saving.

Default inputs of the calculator above. Change any input to run your own numbers.
Customers on the AI plan1,000
Price per AI customer$49/mo
Requests per customer500/mo
Tokens per request (input / output)3,000 / 900
Price per 1M tokens (input / output)$3 / $15
Cache or cheap-routing saving20%
Non-AI COGS / target margin12% / 75%
Cost per request$0.0225
AI cost per customer$9.00/mo
AI COGS (revenue $49,000/mo)$9,000/mo, 18.4% of revenue
Gross margin before AI88.0%
Inference efficiency5.4:1
Heavy user (2.5x)$22.50/mo
To hold 75%price +41% (to $69.23) or AI cost −29%
Gross margin after AI69.6%

Where your margin should land

Traditional SaaS runs a 75-85% gross margin; blended B2B software margin held around 79-81% through 2025 (Aleph × Benchmarkit 2026, n=342), so at the median there is no visible AI compression yet. The pressure shows up first on AI-heavy products: ICONIQ's July 2026 State of AI: The Builder's Economy puts average AI-product gross margin at 53% for 2026 (45% in 2025, 59% projected for 2027), and the original a16z observation (2020) pegged AI-native businesses at 50-60%. Inference is the fastest-growing cost line, so the honest read is that AI margins run below the SaaS norm and are climbing, not that the category floor has moved.

The inference efficiency ratio (AI revenue ÷ AI inference cost, a Ben Murray / The SaaS CFO metric) is the quick health check: aim for 5:1 or better for an AI-native product, higher for an AI feature bolted onto a healthy SaaS. Below ~4:1, the feature is eating the business.

Holding your target margin

There are only two levers, and the calculator sizes both: raise price until revenue covers the AI cost at your target, or cut cost per request (a cheaper model, more caching, fewer or shorter prompts). Usually the answer is a mix. When seats stop mapping to how much a customer actually uses the model, the pricing itself has to change, which is why so many teams are moving to usage-based or hybrid pricing. To model the full picture, revenue and AI cost together across scenarios, build it in Adlega.

Model prices are yours to enter, so nothing here goes stale and no list of providers is implied. All figures are illustrative; use your own token counts and rates.

Embed this calculator on your site

Free to use. Copy the snippet, it drops the calculator into any page and adds a small credit link back here.

Frequently asked questions

How do you calculate AI cost per customer?
Cost per request = input tokens ÷ 1M × input price + output tokens ÷ 1M × output price. Multiply by requests per customer per month and take off any caching or cheap-routing saving. With the default inputs that is $0.0225 per request × 500 requests × 0.8 = $9.00 per customer per month.
How does AI cost affect SaaS gross margin?
Inference is cost of revenue, on the same line as hosting and support. Gross margin = (revenue − non-AI COGS − AI COGS) ÷ revenue, so every dollar of tokens comes straight off margin. See what AI does to your gross margin for the full walk-through.
What is a good gross margin for an AI product?
Traditional SaaS runs a 75-85% gross margin. ICONIQ's July 2026 State of AI puts average AI-product gross margin at 53% for 2026 (59% projected for 2027), and a16z (2020) pegged AI-native businesses at 50-60%. The calculator tells you which band your number falls in.
What is the inference efficiency ratio?
AI revenue divided by AI inference cost, a metric from Ben Murray (The SaaS CFO). Aim for 5:1 or better for an AI-native product; below about 4:1 the feature is eating the business. The default inputs give 5.4:1.
Should I raise my price or cut token cost to protect margin?
Run both in the calculator: it sizes the price rise and the cost cut that each restore your target margin on their own. Most teams use a mix, and some change the pricing model itself, see outcome-based pricing and usage-based pricing.
Cite this page

Citation

Adlega. "AI Cost Calculator: LLM Inference Cost per Customer." Updated October 22, 2026. https://adlega.com/blog/tools/ai-cost/

Link for your article

<a href="https://adlega.com/blog/tools/ai-cost/">AI Cost Calculator: LLM Inference Cost per Customer</a> (Adlega, updated October 22, 2026)

Plan the whole picture in Adlega

Adlega turns these one-off numbers into a live financial model for your SaaS, projections, scenarios, dashboards.

Try Adlega free