Skip to content

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.

Runs in your browser. Your inputs are not uploaded.Open formulaPrices updated November 2026
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.

Jump to results

Your inputs

Usage
Per prompt, including system prompt and retrieved context.
Billed at the output rate.
Discounts
Share of input tokens billed at the cached-read rate.
Share of input tokens written to cache. Hit share plus write share must not exceed 100.
Share of volume run on batch endpoints at each model's batch discount.
Business
Defaults to the daily active users.
Hosting, support and similar.
Models
Models to compare
The first model is the primary one used for the headline and routing.
Business
Used for analytics only; it never changes the result.

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.
Prompts per month
2,400,000
Tokens per month
4,560M
Revenue per month
$290,000
10,000 billed users
Cheapest meeting target
Claude Haiku 5.5
70% gross margin target

Monthly API cost by model

Cost breakdown per model
ModelInput costOutput costMonthly costPer userPer promptGross marginPrice for target margin
Claude Opus 5.5$18,720$24,960$43,680$4.37$0.018284.9%$14.56
GPT-5.5$18,000$28,800$46,800$4.68$0.019583.9%$15.60
Gemini 4 Argon$7,200$9,600$16,800$1.68$0.00794.2%$5.60
Claude Haiku 5.5$468.00$624.00$1,092$0.1092$0.00045599.6%$0.36
GPT-5.4 mini$2,700$4,320$7,020$0.702$0.00292597.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

List prices per million tokens (USD). * = at least one value on that row is an unverified assumption
ModelProviderInputCached inputOutputBatch discountContext windowAs ofChecked on official page
Claude Fable 5.1anthropic$10.00$0.25$50.0050%1,000,0002026-11-052026-11-05
Claude Opus 5.5anthropic$4.00$0.20$20.0050%1,000,0002026-11-052026-11-05
Claude Sonnet 5.5anthropic$2.00$0.10$10.0050%1,000,0002026-11-052026-11-05
Claude Haiku 5.5anthropic$0.10$0.01$0.5050%1,000,0002026-11-052026-11-05
Claude Haiku 4.5anthropic$1.00$0.10$5.0050%n/a2026-11-052026-11-05
GPT-5.5openai$5.00$0.50$30.0050%1,050,0002026-11-052026-11-05
GPT-5.4 miniopenai$0.75$0.075$4.5050%400,0002026-11-052026-11-05
GPT-6.1 Terraopenai$1.00$0.05$5.0050%1,050,0002026-11-052026-11-05
Gemini 4 Argongoogle$2.00$0.10$10.0050%1,000,0002026-11-052026-11-05
Gemini 3.8 Flash *google$0.75$0.075$3.7550%n/a2026-11-05Partly: cache_write_usd_per_mtok
Gemini 3.1 Pro (preview) *google$2.00$0.20$12.0050%n/a2026-11-05Partly: cache_write_usd_per_mtok
Gemini 3.5 Flash-Lite *google$0.30$0.03$2.5050%n/a2026-11-05Partly: cache_write_usd_per_mtok
Gemini 3.1 Flash-Lite *google$0.25$0.025$1.5050%n/a2026-11-05Partly: cache_write_usd_per_mtok
Mistral Large 4mistral$0.70$0.07$2.1050%1,000,0002026-11-052026-11-05
Mistral Small 4mistral$0.15$0.015$0.6050%256,0002026-11-052026-11-05
GPT OSS 120B (Groq)groq$0.15$0.075$0.6050%131,0722026-11-052026-11-05
GPT OSS 20B (Groq)groq$0.075$0.0375$0.3050%131,0722026-11-052026-11-05
Hidden gotchas
TopicWhat catches people out
Output tokensOutput costs several times more than input per token, so long answers dominate the bill.
Reasoning tokensHidden reasoning tokens bill as output even though users never see them.
CachingCaching has a minimum prompt length and an expiry, and some vendors charge extra to write the cache.
Long promptsPrompts past a threshold (for example 272K tokens) can trigger a higher rate for the whole request.
BatchBatch endpoints trade latency for a discount; they only suit work that can wait.
TokenizersTokenizers differ, so the same text yields different token counts by vendor.
Price changesPrices change often and introductory rates can end on a fixed date.

Three ways to reduce this number

  1. Cache the stable system prompt and shared context.
  2. Route easy requests to a smaller model and escalate only when needed.
  3. 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.