Skip to content
All posts
By the PromptUnit team···16 min read

AI Cost Per User: Formula, Examples and SaaS Margins

How to calculate AI cost per user and its share of plan price, with GPT-6 and Claude examples, reasoning tokens, caching and a $29 plan. Checked Oct 20, 2026.

saas unit economicsai cost per userllm cost managementsaas margins

AI cost per user is your monthly AI API spend divided by your monthly active users. On its own it is a cost figure. Next to what each user pays, it tells you whether a customer is profitable. A $10,000 monthly LLM bill is small across 20,000 paying users and a problem across 500, and the invoice alone does not tell you which one you have.

This post gives the formulas, prices them with the current OpenAI and Anthropic models, adds two things that change per-user cost a lot on current models (reasoning tokens and prompt caching), and walks through a $29 plan. Prices, limits and model details were checked on the vendors' own pages on October 20, 2026, and every calculation shows its arithmetic.

The formulas

Three numbers cover most decisions:

  • AI cost per active user = monthly AI API spend / monthly active users. $8,000 of spend across 5,000 active users is $1.60 per user (8,000 / 5,000).
  • AI cost as a share of price = AI cost per paying user / monthly plan price. $1.60 on a $29 plan is 5.5% (1.60 / 29).
  • Cost of one request = (uncached input tokens x input price + cache write tokens x write price + cache read tokens x read price + output tokens x output price) / 1,000,000, with prices per million tokens. Output tokens include reasoning tokens, covered below.

Three details keep the numbers honest:

  1. Split free and paying users. Free users have no price to divide by. Report their AI cost as its own line and compute the share of price for paying users only.
  2. Count every call a user triggers. One click in an agent can make several model calls. Log the same user id on all of them.
  3. Read token counts from the usage object, and know how each provider reports them. Anthropic's input_tokens counts only the tokens after the last cache breakpoint, so total input is input_tokens + cache_creation_input_tokens + cache_read_input_tokens (prompt caching docs). OpenAI's input_tokens already includes cached and cache-write tokens, which it breaks out under input_tokens_details as cached_tokens and cache_write_tokens (prompt caching guide). Treat the two the same way and you either undercount Claude or double count OpenAI.

The SQL that turns logged calls into cost per user per day, and into each user's cost as a share of their plan price, is in the "How to Track LLM Cost per User" section of LLM cost tracking.

What one user costs on current models

Take a chat assistant inside a SaaS product. Assume each active user sends 10 messages a day for 30 days, so 300 requests a month. Each request carries 3,000 input tokens (system prompt, retrieved context and recent history) and returns 500 output tokens. Per user per month that is 900,000 input tokens (300 x 3,000) and 150,000 output tokens (300 x 500), or 0.9 and 0.15 million.

Cost per user = 0.9 x input price + 0.15 x output price. On GPT-6.1 Sol: 0.9 x $2 + 0.15 x $10 = $1.80 + $1.50 = $3.30.

Prices are per million tokens at standard rates, from OpenAI's pricing page (short context, up to 272K input tokens) and Anthropic's pricing page, checked October 12, 2026. "Cached input" is the price of reading a prefix from the prompt cache.

Model Input Cached input Output Chat feature, per user per month Share of a $29 plan
GPT-6 Astra $10.00 $1.00 $50.00 $16.50 56.9%
GPT-6.1 Sol $2.00 $0.10 $10.00 $3.30 11.4%
GPT-6 Luna $0.10 $0.01 $0.50 $0.165 0.6%
GPT-5.6 Sol $4.00 $0.40 $20.00 $6.60 22.8%
GPT-5.6 Terra $2.00 $0.20 $12.00 $3.60 12.4%
GPT-5.6 Luna $0.20 $0.02 $1.20 $0.36 1.2%
Claude Fable 5.1 $10 $0.25 $50 $16.50 56.9%
Claude Opus 5.5 $4 $0.20 $20 $6.60 22.8%
Claude Sonnet 5.5 $2 $0.10 $10 $3.30 11.4%
Claude Haiku 5.5, prompt up to 100K tokens $0.10 $0.01 $0.50 $0.165 0.6%
Claude Haiku 5.5, prompt over 100K tokens $0.50 $0.05 $2.50 not reached here

Notes on the table:

  • Both vendors also charge to write a prefix into the cache: 1.25 times the input price for GPT-5.6 and later models and for Claude's 5-minute cache, and 2 times for Claude's 1-hour cache.
  • OpenAI says GPT-5.6 Sol's price is promotional and available at least through November 21, 2026.
  • OpenAI charges more once input passes 272K tokens (GPT-6.1 Sol goes to $4 input and $15 output). Claude Haiku 5.5 switches to its higher prices when a prompt is over 100,000 tokens, and cache reads and writes count toward that length. The other current Claude models charge one rate across their 1M-token context window.
  • The token counts are an assumption held equal across models. In practice the same text produces different counts on different tokenizers, and Anthropic says Claude 4.7 and later models produce about 30% more tokens for the same text than Claude Sonnet 4.6 and earlier. Treat comparisons across vendors and across Claude generations as estimates, and count your own prompts on each model.

The same feature costs $0.165 or $16.50 per user per month depending on the model, a 100 times difference (16.50 / 0.165). No other change in this post moves the number that far.

Moving from Claude Sonnet 4.6, as an estimate. Sonnet 4.6 is still available at $3 input and $15 output, so this feature costs $4.95 per user on it (0.9 x $3 + 0.15 x $15 = $2.70 + $2.25). Sonnet 5.5's list prices are a third lower, but it uses the newer tokenizer. With 30% more tokens for the same text: 1.17 million input x $2 + 0.195 million output x $10 = $2.34 + $1.95 = $4.29, about 13% lower than on Sonnet 4.6 (4.29 / 4.95 = 0.867), not 33%. That is an estimate, and it leaves out thinking tokens, which differ between the two models.

See what each request costs

PromptUnit shows every request your app sends: the model it asked for, the model that answered, what it cost and what it saved. You change two settings, and your own provider key stays.

Try it free →

Reasoning tokens are billed as output

Current models can think before they answer, and you pay for the thinking. OpenAI's reasoning guide says reasoning tokens are not visible through the API but are billed as output tokens, and that a model may generate from a few hundred to tens of thousands of them depending on the problem. Anthropic's thinking docs say the tokens Claude spends reasoning are billed as output tokens even when the thinking text is not returned, and that with summarized thinking you pay for the full thinking, not the summary.

The defaults matter, because many teams never change them:

  • GPT-6.1 Sol and GPT-6 Luna default to medium reasoning effort. GPT-6.1 Sol does not accept none or minimal, and GPT-6 Astra does not accept none.
  • On the current Claude models thinking is adaptive: the model decides per request whether to think, steered by the effort setting. It is always on for Claude Fable 5.1 and Opus 5.5. Default effort is high on Fable 5.1 and Sonnet 5.5 and medium on Opus 5.5 and Haiku 5.5 (models overview).

What reasoning does to the chat example: assume each request also produces 1,000 reasoning tokens on average. That adds 300,000 output tokens per user per month (300 x 1,000), or 0.3 million. Pairs of models with the same list prices share a row.

Models Without reasoning Reasoning added With reasoning Share of a $29 plan
GPT-6 Astra, Claude Fable 5.1 $16.50 0.3 x $50 = $15.00 $31.50 108.6%
GPT-5.6 Sol, Claude Opus 5.5 $6.60 0.3 x $20 = $6.00 $12.60 43.4%
GPT-6.1 Sol, Claude Sonnet 5.5 $3.30 0.3 x $10 = $3.00 $6.30 21.7%
GPT-6 Luna, Claude Haiku 5.5 $0.165 0.3 x $0.50 = $0.15 $0.315 1.1%

At 1,000 reasoning tokens per request the flagship row costs more than the user pays, and the middle rows roughly double. The 1,000 is an assumption for illustration. Your real number is in the usage object: OpenAI reports it as usage.output_tokens_details.reasoning_tokens, and Anthropic as usage.output_tokens_details.thinking_tokens, with output_tokens as the billed total that already includes them. Log it per request next to the user id.

Two settings bound it. Lower effort means less thinking on both platforms, and Anthropic's docs suggest lowering effort first when you want a thinking workload to cost less. Output caps (max_output_tokens on OpenAI, max_tokens on Claude) limit reasoning and answer together. Leave room in the cap: OpenAI notes that a response can stop at the cap before any visible text, and you still pay for the input and reasoning tokens.

Prompt caching lowers the input side

In the chat example, input is $1.80 of the $3.30 on GPT-6.1 Sol or Claude Sonnet 5.5, and much of it repeats: the system prompt and instructions are the same on every request. Both models charge $0.10 per million tokens to read a cached prefix, 5% of the $2 input price, and $2.50 per million to write it.

Assume 2,000 of each request's 3,000 input tokens are a shared system prompt, and that 9 in 10 requests read it from the cache while 1 in 10 has to write it again:

  • Cache writes: 30 requests x 2,000 tokens = 60,000 tokens x $2.50 per million = $0.15
  • Cache reads: 270 requests x 2,000 tokens = 540,000 tokens x $0.10 per million = $0.054
  • Uncached input: 300 requests x 1,000 tokens = 300,000 tokens x $2 per million = $0.60
  • Output: 150,000 tokens x $10 per million = $1.50

Total $2.304, about $2.30, against $3.30 without caching: about 30% less per user (0.996 / 3.30 = 0.302).

What decides your real hit rate:

  • Minimum length. Claude Fable 5.1, Opus 5.5, Sonnet 5.5 and Haiku 5.5 cache prefixes of 512 tokens or more. OpenAI's GPT-5.6 and later models need 1,024. Claude processes a shorter prefix without caching and returns no error.
  • Lifetime. Claude's standard cache lasts 5 minutes and is refreshed each time it is read; the 1-hour cache costs 2 times the input price to write. OpenAI keeps a GPT-5.6-and-later prefix for at least 30 minutes after its latest write or reuse.
  • Exact match. A hit needs an identical prefix, so put per-user content (name, plan, retrieved documents) after the shared part. Anthropic keeps caches separate per organization and per workspace.
  • Effort changes. On Claude, the thinking settings and effort level are part of the prompt, so changing them starts a new cache prefix. If free and paid users get different effort levels, each level warms its own cache.

Measure it per user. OpenAI's caching guide suggests tracking the cache-hit rate (cached tokens divided by input tokens) by user, workspace or day, and lets you send a separate prompt_cache_key per customer or user when you want cached usage to be easy to explain for each one. Prompt caching on OpenAI and Anthropic covers the setup.

Where per-user cost hides

Feature mix. Say a product has a search feature that runs 50,000 times a day on GPT-6 Luna with 1,000 input and 100 output tokens: (1,000 x $0.10 + 100 x $0.50) / 1,000,000 = $0.00015 per call, or $7.50 a day. Its document summarizer runs 2,000 times a day on Claude Sonnet 5.5 with 10,000 input and 800 output tokens: (10,000 x $2 + 800 x $10) / 1,000,000 = $0.028 per call, or $56 a day. The summarizer runs 25 times less often and costs about 7.5 times more (56 / 7.5 = 7.47), before any reasoning tokens. You only see this if every call is tagged with a feature name and a user id in your own logs, because the providers' usage reports do not group by that request metadata. LLM cost attribution by feature shows what each provider can group by and how to tag the rest.

Heavy users. An average hides the tail. Sort users by 30-day AI cost and compare the top of the list with their plan price. Long conversations, where earlier turns go back in as input on every request, and long documents push single users up. On Claude Haiku 5.5 the 100,000-token threshold makes this sharp: a 120,000-token prompt with 1,000 output tokens costs 0.12 x $0.50 + 0.001 x $2.50 = $0.0625, while a 100,000-token prompt at the lower rate costs 0.1 x $0.10 + 0.001 x $0.50 = $0.0105. That is 20% more input for about 6 times the cost.

Free users on the paid model. Running free and paid users through Claude Sonnet 5.5 at $2 input and $10 output means a free request costs as much as a paid one. If free users' requests are simple enough for a cheaper model, which your own evaluations have to show, sending them there cuts that line. LLM routing covers routing by task and by tier.

Worked example: a $29 plan

Assume a paying user on a $29 plan uses two features a month:

  • The chat assistant from above: 300 requests of 3,000 input and 500 output tokens, with 1,000 reasoning tokens per request on average.
  • A document summary: 20 documents of 20,000 input and 1,000 output tokens, so 400,000 input tokens (20 x 20,000) and 20,000 output tokens (20 x 1,000).

Start with everything on Claude Sonnet 5.5. At list prices, GPT-6.1 Sol with GPT-6 Luna in step 4 gives the same numbers.

Step Change AI cost per user Share of $29
1 Baseline: chat $3.30 + reasoning $3.00 + summaries $1.00 (0.4 x $2 + 0.02 x $10) $7.30 25.2%
2 Cache the 2,000-token system prompt in chat, saving $0.996 as computed above $6.30 21.7%
3 Lower chat effort so reasoning averages 300 tokens: 0.09 million x $10 = $0.90 instead of $3.00 $4.20 14.5%
4 Move summaries to Claude Haiku 5.5 if it passes your evaluations: 0.4 x $0.10 + 0.02 x $0.50 = $0.05 instead of $1.00 $3.25 11.2%

The arithmetic: 7.30 - 0.996 = 6.304; 6.304 - 3.00 + 0.90 = 4.204; 4.204 - 1.00 + 0.05 = 3.254. Each 20,000-token document is under Haiku 5.5's 100,000-token threshold, so the lower price applies. The 300-token reasoning figure in step 3 is an assumption, like the 1,000 in step 1.

AI cost per user fell from $7.30 to about $3.25, about 55% lower (4.046 / 7.30 = 0.554), without changing the price or the features. Steps 3 and 4 trade on quality, so test them on your own traffic before you ship them. Step 2 does not: Anthropic's docs say a response from a cached prompt is identical to one without caching.

Setting a per-user AI budget

There is no standard share of price that AI should take. It follows from your margin target:

Maximum AI cost per user = plan price x (1 - target gross margin) - other cost to serve that user

With a 75% gross margin target, a $29 plan leaves $7.25 for all cost to serve (29 x 0.25). If hosting, payment fees and support come to $3.00 per user, the AI budget is $4.25 (7.25 - 3.00). The baseline above ($7.30) is over it; after step 3 ($4.20) it fits. Use your own target and costs; these are example numbers.

Then enforce it in the application:

  • Keep a running total of AI cost per user id for the month.
  • Decide what happens at the budget: switch that user to a cheaper model, lower the effort, slow requests down, or flag the account for review.
  • Watch how many users reach it. If many paying users do, the plan is priced below what they use. If almost none do, the budget is a safety net and you can leave it there.

A user with $15 of AI cost on a $29 plan spends 52% of their price on AI (15 / 29 = 0.517) before hosting and support.

Growth changes the ratio, not just the total

Suppose 500 active users generate $800 a month in AI cost: $1.60 per user (800 / 500), or 5.3% of a $30 average revenue per user (1.60 / 30). You grow to 5,000 users and the bill reaches $8,000: still $1.60 per user. If instead the new users lean on a heavy feature such as document processing and cost per user rises to $3.00, the share becomes 10% (3.00 / 30) and the bill is $15,000 (5,000 x 3.00). The total grew in both cases. Only the ratio tells you whether each new user is less profitable.

Do not count on volume to fix it. List prices are per token at every volume, and Anthropic's pricing page says volume discounts are negotiated case by case. Both providers list Batch API prices for their current models at half the standard rate, which helps only for features that can wait for an answer. What lowers cost per user at scale is the work above: model choice per request, reasoning effort, caching and shorter prompts.

Where PromptUnit fits

PromptUnit checks each request and uses a cheaper model when one is just as good for that request; otherwise the request goes to the model you asked for. Setup is two settings: point your API base URL at PromptUnit and add your PromptUnit key, while your own provider key stays. It works with OpenAI, Anthropic, Google, Groq and DeepSeek keys. The dashboard shows every request with the model asked for, the model that answered, what it cost and what it saved, plus cost per feature from the x-promptunit-feature header and cost per step of your app. It has no per-user view, so keep the user id in your own logs and compute cost per user there.

It is free until it has saved you money, then it takes 20% of what it saves. If it saves nothing, you pay nothing. Start free.

Current prices of the models in this post

Per 1 million tokens, input and output, read every day from each provider's own pricing page.

Compare: Claude Opus 5.5 vs GPT-6 Astra

All AI API prices →

FAQ

How do you calculate AI cost per user?

Divide a month's AI API spend by the number of users who were active that month. To judge margins, take the AI cost of paying users only and divide it by their plan price. For example, $8,000 of spend across 5,000 active users is $1.60 per user, which is 5.5% of a $29 plan.

Are reasoning tokens part of AI cost per user?

Yes. OpenAI and Anthropic both bill reasoning (thinking) tokens as output tokens, even when the reasoning text is not returned to you. On Claude Sonnet 5.5 or GPT-6.1 Sol at $10 per million output tokens, an average of 1,000 reasoning tokens on each of 300 requests a month adds $3.00 per user. Prices checked October 20, 2026.

How much does prompt caching lower AI cost per user?

It depends on how much of each prompt repeats. On Claude Sonnet 5.5 and GPT-6.1 Sol a cache read costs $0.10 per million tokens instead of $2, and a cache write costs $2.50. In a chat example where a shared 2,000-token system prompt is read from cache on 9 in 10 requests, cost per user fell from $3.30 to about $2.30 a month. Prices checked October 20, 2026.

What share of a $29 plan should AI cost?

There is no standard share. Work it out from your margin target: plan price times (1 minus your target gross margin), minus the other cost of serving that user. With a 75% target and $3.00 of hosting, payment and support cost per user, a $29 plan leaves $4.25 a month for AI.

Does PromptUnit show AI cost per user?

No. PromptUnit shows every request with its cost, cost per feature from the x-promptunit-feature header and cost per step of your app, but it has no per-user view. Keep your internal user id in your own logs and group cost by it there.

Start saving from your first request

Change two settings and see what your first request saved within seconds. Free until we've saved you money. If we save you $0, you pay $0.

Get started free →