Free calculator

AI Cost & Margin Calculator

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.

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 Jan-2026 State of AI put AI-product gross margin at 52% (up from 41% in 2024), 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.

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