LLM API Pricing Comparison & Cost Calculator

Compare live API pricing per million tokens across GPT-4o, Claude, Gemini, Llama, Mistral, DeepSeek, and 300+ models. 2026 prices, updated in real time.

Loading pricing data...
Prices in USD per 1M tokens · Source: OpenRouter API

Paste text to calculate cost

Tokenized with GPT-4o (o200k_base). Exact for OpenAI models; within ±15% for Anthropic, Google, Mistral and others that use different tokenizers.

Monthly Usage Estimate

Tip: 1M tokens ≈ 750K words

Filters

ModelProviderInput / 1MOutput / 1MContextEst. 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.

How the LLM Cost Calculator Works

Live Pricing Data

Prices are fetched in real time from the OpenRouter API, which tracks 300+ models across all major providers. No stale spreadsheets.

Per-Token Pricing

LLMs charge separately for input tokens (your prompt) and output tokens (the response). This calculator shows both so you can model your specific workload.

Side-by-Side Comparison

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.

Always Up to Date

Providers update their pricing frequently — new models launch, prices drop, free tiers appear. Because we fetch live data, you always see the latest numbers.

Understanding LLM API Pricing in 2026

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.

Related Tools

Stay in the loop

Get notified when new tutorials and deep-dives are published. No spam, unsubscribe anytime.

LLM Pricing FAQ

Common questions about LLM API costs and token pricing