Skip to content
Free tool

LLM cost calculator: estimate monthly spend before you build

Requests, tokens, caching and a model tier in; monthly token volume, monthly cost and cost per request out. Every assumption is on screen and editable.

  • Transparent formula
  • Editable prices per tier
  • No sign-up, runs in your browser
Illustrative defaults, edit to match your provider's price list

The three tiers and their prices are placeholders that show the typical spread between small, mid-range and frontier models. They are not quotes from any provider and will drift. Overwrite the price fields with the numbers from your provider's current price list before you rely on the result.

Calculator

Enter your workload

Start with the defaults, then replace them with measurements from a sample of real requests.

Optional. Retrieved passages added to each prompt. Typical: 1,500–6,000.

System prompt, history and the user's message.

Share of input tokens billed at the cached rate. Long, stable system prompts cache well; unique user text does not.

Choosing a tier fills the three prices below with illustrative defaults. Edit them freely.

Prices per million tokens (USD), editable

Assumes 30 days per month and one model call per request. Retries, tool calls and multi-turn conversations add tokens.

$0Estimated monthly cost

Cost per request $0 · 0 tokens per month

  • Requests per month0
  • Input tokens (full price)0
  • Input tokens (cached rate)0
  • Output tokens0
  • Total tokens per month0
  • Cost per request$0
  • Cost per 1,000 requests$0
Share of monthly tokens and monthly cost by full-price input, cached input and output Tokens Cost Input (full price) Input (cached) Output
Output tokens are usually a minority of volume but a majority of cost, because they are priced several times higher than input.
The maths

How the number is calculated

Nothing is hidden. The calculator applies the formula below to your inputs, with all prices expressed per million tokens.

requests_month   = requests_day × 30
input_tokens     = requests_month × (avg_input + rag_context)
cached_tokens    = input_tokens × cache_hit_rate
full_input       = input_tokens − cached_tokens
output_tokens    = requests_month × avg_output

monthly_cost     = full_input / 1e6 × price_input
                 + cached_tokens / 1e6 × price_cached
                 + output_tokens / 1e6 × price_output

cost_per_request = monthly_cost / requests_month

Two things this leaves out on purpose: engineering time, which usually dwarfs inference spend in year one, and the retrieval stack for RAG systems, which the RAG cost estimator covers. For the whole budget conversation, read the real cost of LLM applications.

What moves the number

Five levers, in the order we usually pull them

  • Shorter outputs

    Output tokens cost several times more than input. Structured responses, explicit length limits and "answer, then stop" instructions cut the biggest line item first.

  • Higher cache hit rate

    Put the stable parts of the prompt first: system instructions, tool definitions, reference documents. Unique user text goes last so the shared prefix stays cacheable.

  • Model routing

    Most requests do not need the frontier model. Classify first and send the easy majority to the economy tier. See model routing in the glossary.

  • Tighter retrieval

    In RAG systems the retrieved context is often most of the input. Better ranking and smaller chunks let you send fewer passages with the same answer quality. Our hybrid search service exists for this.

  • Measure before you optimise

    Average tokens per request is the input most teams guess wrong. Log it from day one with LLMOps monitoring, then revisit this calculator with real figures.

Building the application itself? Start with LLM app development, and check the tokens and context window entries if the units are new to you.

FAQ

Frequently asked questions

Where do the default prices come from?

They are illustrative placeholders chosen to show the typical gap between economy, standard and frontier tiers. They are not any provider's price list. Edit the three price fields to match the model and provider you plan to use; the calculation updates immediately.

What does the cache hit rate mean?

Many providers charge a reduced rate for input tokens that repeat exactly from a recent request, such as a long system prompt or a document that stays in context. The hit rate is the share of your input tokens billed at that reduced rate. Stable prefixes and reusing retrieved context are how you raise it.

Does the estimate include retrieval, embeddings and the vector database?

No. It covers model inference only. For a knowledge base or RAG system, add the RAG cost estimator, which sizes embedding, storage and query costs. Our guide to the cost of LLM applications covers the full picture, including engineering and evaluation effort.

Why does the calculator assume 30 days?

To keep the maths visible. Monthly volume is requests per day multiplied by 30. If your traffic is weekday-only or seasonal, enter an average day rather than a peak day, or run the calculation twice.

How accurate will this be once we are in production?

Token counts are the uncertain part, not prices. Measure average input and output tokens on a sample of real requests before you trust the number, then keep measuring with LLMOps monitoring. Retries, tool calls and long conversations all add tokens that a single-request estimate misses.

Ready to make AI work in production?

Tell us about your systems, your data and your constraints. We reply within one business day with a straight answer and a suggested next step.