LLM API cost calculator: price per user and gross margin across models
Turn a usage profile into a monthly bill per model, then into the gross margin at your SaaS price.
How to verify this
Open your browser's network tab and change an input: nothing is sent. The page computes with the formulas and the dated price table below. Some entries in that table could not be checked against an official page and are labelled. The same engine answers the API and the MCP tool, so you can reproduce any scenario from code.
At 10,000 users, Claude Opus 5.5 costs $4.37 per user per month and leaves a 84.94% gross margin at $29.00.
- Heads-up:google:gemini-4-argon: list prices change on 2026-12-01 (input $2.00 to $4.00, output $10.00 to $20.00 per million tokens). This result uses today's prices.
Monthly API cost by model
| Model | Input cost | Output cost | Monthly cost | Per user | Per prompt | Gross margin | Price for target margin |
|---|---|---|---|---|---|---|---|
| Claude Opus 5.5 | $18,720 | $24,960 | $43,680 | $4.37 | $0.0182 | 84.9% | $14.56 |
| GPT-5.5 | $18,000 | $28,800 | $46,800 | $4.68 | $0.0195 | 83.9% | $15.60 |
| Gemini 4 Argon | $7,200 | $9,600 | $16,800 | $1.68 | $0.007 | 94.2% | $5.60 |
| Claude Haiku 5.5 | $468.00 | $624.00 | $1,092 | $0.1092 | $0.000455 | 99.6% | $0.36 |
| GPT-5.4 mini | $2,700 | $4,320 | $7,020 | $0.702 | $0.002925 | 97.6% | $2.34 |
Monthly cost as your user count (or volume) changes
Calculating the range…
How it is calculated
Prompts per month
P = DAU × prompts_per_user_per_day × active_days_per_month
Token volume per model (millions)
I = P × avg_input_tokens × tokenizer_ratio ÷ 10^6 O = P × (avg_output_tokens + reasoning_tokens) × tokenizer_ratio ÷ 10^6
Monthly cost per model
C_in = I × [h × p_cache + w × p_write + (1 − h − w) × p_in] C_out = O × p_out C = (C_in + C_out) × (1 − b × δ)
Gross margin
GM = (U × π − C − U × k) ÷ (U × π)
Price and volume limits
minimum price = (C ÷ U + k) ÷ (1 − target margin) max prompts/user/day = (π × (1 − target margin) − k) ÷ (cost per prompt × active days)
Assumptions
- h, w and b are the cache-hit, cache-write and batch shares as fractions; δ is the model's batch discount; U is billed users; π is price per user; k is other COGS per user.
- If a model's average input tokens (after tokenizer scaling) exceed its long-context threshold, the dataset's multipliers apply to every request.
- Reasoning tokens are billed at the output rate. Cache storage fees (Gemini) and regional uplifts are not modelled.
- Token counts you enter are treated as baseline tokens; each model's tokenizer_ratio scales them. Vendors other than newer Claude models are 1.0 because no comparable figure is published.
- Prices are list prices in USD; negotiated discounts, free tiers and committed-use pricing are not applied.
The data behind it
| Model | Provider | Input | Cached input | Output | Batch discount | Context window | As of | Checked on official page |
|---|---|---|---|---|---|---|---|---|
| Claude Fable 5.1 | anthropic | $10.00 | $0.25 | $50.00 | 50% | 1,000,000 | 2026-11-05 | 2026-11-05 |
| Claude Opus 5.5 | anthropic | $4.00 | $0.20 | $20.00 | 50% | 1,000,000 | 2026-11-05 | 2026-11-05 |
| Claude Sonnet 5.5 | anthropic | $2.00 | $0.10 | $10.00 | 50% | 1,000,000 | 2026-11-05 | 2026-11-05 |
| Claude Haiku 5.5 | anthropic | $0.10 | $0.01 | $0.50 | 50% | 1,000,000 | 2026-11-05 | 2026-11-05 |
| Claude Haiku 4.5 | anthropic | $1.00 | $0.10 | $5.00 | 50% | n/a | 2026-11-05 | 2026-11-05 |
| GPT-5.5 | openai | $5.00 | $0.50 | $30.00 | 50% | 1,050,000 | 2026-11-05 | 2026-11-05 |
| GPT-5.4 mini | openai | $0.75 | $0.075 | $4.50 | 50% | 400,000 | 2026-11-05 | 2026-11-05 |
| GPT-6.1 Terra | openai | $1.00 | $0.05 | $5.00 | 50% | 1,050,000 | 2026-11-05 | 2026-11-05 |
| Gemini 4 Argon | $2.00 | $0.10 | $10.00 | 50% | 1,000,000 | 2026-11-05 | 2026-11-05 | |
| Gemini 3.8 Flash * | $0.75 | $0.075 | $3.75 | 50% | n/a | 2026-11-05 | Partly: cache_write_usd_per_mtok | |
| Gemini 3.1 Pro (preview) * | $2.00 | $0.20 | $12.00 | 50% | n/a | 2026-11-05 | Partly: cache_write_usd_per_mtok | |
| Gemini 3.5 Flash-Lite * | $0.30 | $0.03 | $2.50 | 50% | n/a | 2026-11-05 | Partly: cache_write_usd_per_mtok | |
| Gemini 3.1 Flash-Lite * | $0.25 | $0.025 | $1.50 | 50% | n/a | 2026-11-05 | Partly: cache_write_usd_per_mtok | |
| Mistral Large 4 | mistral | $0.70 | $0.07 | $2.10 | 50% | 1,000,000 | 2026-11-05 | 2026-11-05 |
| Mistral Small 4 | mistral | $0.15 | $0.015 | $0.60 | 50% | 256,000 | 2026-11-05 | 2026-11-05 |
| GPT OSS 120B (Groq) | groq | $0.15 | $0.075 | $0.60 | 50% | 131,072 | 2026-11-05 | 2026-11-05 |
| GPT OSS 20B (Groq) | groq | $0.075 | $0.0375 | $0.30 | 50% | 131,072 | 2026-11-05 | 2026-11-05 |
| Topic | What catches people out |
|---|---|
| Output tokens | Output costs several times more than input per token, so long answers dominate the bill. |
| Reasoning tokens | Hidden reasoning tokens bill as output even though users never see them. |
| Caching | Caching has a minimum prompt length and an expiry, and some vendors charge extra to write the cache. |
| Long prompts | Prompts past a threshold (for example 272K tokens) can trigger a higher rate for the whole request. |
| Batch | Batch endpoints trade latency for a discount; they only suit work that can wait. |
| Tokenizers | Tokenizers differ, so the same text yields different token counts by vendor. |
| Price changes | Prices change often and introductory rates can end on a fixed date. |
Last updated 2026-11-05 (dataset 2026-11-05, refreshed weekly). Entries marked unverified or modelled could not be checked against an official page.
- https://platform.claude.com/docs/en/about-claude/pricing
- https://platform.claude.com/docs/en/about-claude/models/overview
- https://platform.claude.com/docs/en/about-claude/model-deprecations
- https://developers.openai.com/api/docs/models/gpt-5.5
- https://developers.openai.com/api/docs/guides/batch
- https://developers.openai.com/api/docs/guides/prompt-caching
- https://developers.openai.com/api/docs/models/gpt-5.4-mini
- https://developers.openai.com/api/docs/models/gpt-6.1-terra
- https://ai.google.dev/gemini-api/docs/pricing
- https://ai.google.dev/gemini-api/docs/models
- https://ai.google.dev/gemini-api/docs/batch-api
- https://ai.google.dev/gemini-api/docs/caching
- https://ai.google.dev/gemini-api/docs/generate-content/caching
- https://docs.mistral.ai/inference/pricing
- https://docs.mistral.ai/models/mistral-large-4
- https://mistral.ai/pricing
- https://docs.mistral.ai/studio-api/conversations/advanced/prompt-caching
- https://docs.mistral.ai/models/mistral-small-4-0-26-03
- https://console.groq.com/docs/model/openai/gpt-oss-120b
- https://console.groq.com/docs/models
- https://console.groq.com/docs/batch
- https://console.groq.com/docs/prompt-caching
- https://console.groq.com/docs/model/openai/gpt-oss-20b
Three ways to reduce this number
- Cache the stable system prompt and shared context.
- Route easy requests to a smaller model and escalate only when needed.
- Cap output length and move non-interactive work to batch.
Use it from code
The same engine is available as a REST endpoint and as an MCP tool named calc_llm_api_pricing_margin_calculator. Your scenario as an API call:
curl -X POST 'https://api.x12i.com/v1/calc/llm-api-pricing-margin-calculator' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"input": {
"daily_active_users": 10000,
"prompts_per_user_per_day": 8,
"avg_input_tokens": 1500,
"avg_output_tokens": 400,
"reasoning_tokens_per_prompt": 0,
"active_days_per_month": 30,
"cache_hit_pct": 0,
"cache_write_pct": 0,
"batch_share_pct": 0,
"target_price_usd_per_user_month": 29,
"other_cogs_usd_per_user_month": 0,
"target_gross_margin_pct": 70,
"models": [
"anthropic:claude-opus-5-5",
"openai:gpt-5.5",
"google:gemini-4-argon",
"anthropic:claude-haiku-5-5",
"openai:gpt-5.4-mini"
],
"product_stage": "seed"
},
"options": {
"explain": false
}
}' Schema: GET /v1/calc/llm-api-pricing-margin-calculator/schema
Frequently asked questions
How do I calculate LLM API cost per user?
Multiply daily active users by prompts per user per day and active days to get prompts per month. Multiply by average input and output tokens, price each side per million tokens, then divide the monthly total by billed users.
What is cached input pricing?
When part of a prompt repeats exactly, the vendor can read it from a cache at a fraction of the normal input price. Some vendors charge extra to write the cache first, and caches expire.
What gross margin should an AI SaaS target?
Traditional SaaS often targets 70 to 80 percent. AI products usually start lower because inference is a real cost of goods; this calculator shows the price or usage limit that reaches the margin you choose.