Tokenized with GPT-4o (o200k_base). Exact for OpenAI models; within ±15% for Anthropic, Google, Mistral and others that use different tokenizers.
Tip: 1M tokens ≈ 750K words
| Model | Provider | Input / 1M | Output / 1M | Context | Est. Monthly | |
|---|---|---|---|---|---|---|
| Fetching live pricing from OpenRouter... | ||||||
Tip: Paste text above to see exactly what it would cost as input or output for every model. Select 2-5 models to generate a side-by-side monthly cost comparison chart.
Prices are fetched in real time from the OpenRouter API, which tracks 300+ models across all major providers. No stale spreadsheets.
LLMs charge separately for input tokens (your prompt) and output tokens (the response). This calculator shows both so you can model your specific workload.
Select multiple models and compare their estimated monthly cost based on your token usage. Spot the best value at a glance with the built-in bar chart.
Providers update their pricing frequently — new models launch, prices drop, free tiers appear. Because we fetch live data, you always see the latest numbers.
The LLM pricing landscape has evolved dramatically. In 2023, GPT-4 cost $30 per million output tokens. By 2026, frontier models like GPT-4o and Claude Sonnet deliver comparable or better quality at a fraction of the cost, while open-weight models like Llama and DeepSeek have pushed prices even lower.
Most providers use a simple per-token pricing model: you pay separately for input tokens (your prompt, system instructions, and context) and output tokens(the model's response). Output tokens are always more expensive because they require autoregressive generation — one token at a time. A typical ratio is 3:1 to 5:1 (output:input).
For production workloads, the total cost depends on three factors: the model you choose, your prompt design (longer prompts = more input tokens), and how verbose the output is. Techniques like prompt caching, batching, and choosing the right model size can reduce costs by 50-90%. For more on the evolving landscape of AI engineering, see our post on AI expertise in the age of foundation models. Three things multiply the token count above what a single call suggests: an agent loop re-sends its whole scratchpad on every step, retrieval prepends documents to the prompt, and a retry loop on malformed output pays for every failed attempt. Teams running this calculation before a six-figure vendor commitment often bring in a fractional AI advisor for UK firms for an independent build-or-buy decision memo. Investors use the same projection during AI due diligenceto stress-test a target's unit economics at scaled volume. Hedge-fund CIOs weighing a frontier-API contract against a fine-tuned in-house stack can work the same numbers into the decision framework covered in our LLM use cases for hedge funds practice. CTOs typically run this calculator early in an AI readiness engagement, since locked-in vendor-token exposure is one of the first line items on a readiness dashboard. Mid-market firms — where a 10-20× delta between a frontier API and a self-hosted open-weight model often decides whether a project is viable at all — rely on the same numbers when scoping AI consulting for mid-market firms, and when costing the use cases that come out of an AI adoption programme before any of them are committed to. Across every bucket, these calculations sit inside the broader boutique AI consultancy remit: independent, numerate, vendor-agnostic.
Size the KV cache for Llama, Mistral, Qwen and Gemma. Context length, batch size and quantisation against A100, H100 and 4090 memory.
Try itFifteen questions scored against public frameworks, with your result compared to what UK businesses your size report to the ONS. No email required.
Try itFrequentist and Bayesian A/B test analysis. Z-test for proportions, Beta posterior distributions, probability of winning, and expected loss.
Try itCreate a visual sitemap from any URL. Visualize your website structure, analyze internal links, and find orphan pages.
Try itGet notified when new tutorials and deep-dives are published. No spam, unsubscribe anytime.
Common questions about LLM API costs and token pricing