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
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.
Enter your workload
Start with the defaults, then replace them with measurements from a sample of real requests.
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
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.
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.
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.