LLM API Cost Calculator

Compare what your prompts cost across every major LLM — with exact token counts for OpenAI models, right in your browser.

Prices verified 2026-07-11 · per 1M tokens · sources linked per provider

ModelCost / callCost / month× best price
Mistral AIMinistral 3Bcheapest$0.00008$0.08
GroqLlama 3.1 8B Instant$0.00013$0.131.6×
Mistral AIMistral Small 3$0.0004$0.45.0×
DeepSeekDeepSeek V4 Flash$0.00042$0.425.3×
Google GeminiGemini 2.5 Flash-Lite$0.0005$0.56.3×
GroqGPT-OSS 120B$0.00075$0.759.4×
GroqQwen3 32B$0.00088$0.8811.0×
DeepSeekDeepSeek V4 Pro$0.0013$1.3116.3×
GroqLlama 3.3 70B Versatile$0.00138$1.3817.3×
OpenAIGPT-5.4 nano$0.00145$1.4518.1×
Mistral AIMistral Large 3$0.002$2.0025.0×
Google GeminiGemini 2.5 Flash$0.0028$2.8035.0×
xAI GrokGrok 4.3$0.00375$3.7546.9×
OpenAIGPT-5.4 mini$0.00525$5.2565.6×
Anthropic ClaudeClaude Haiku 4.5$0.006$6.0075.0×
OpenAIGPT-5.6 Luna$0.007$7.0087.5×
xAI GrokGrok 4.5$0.008$8.00100.0×
Mistral AIMistral Medium 3.5$0.009$9.00112.5×
Google GeminiGemini 3.5 Flash$0.0105$10.50131.3×
Google GeminiGemini 2.5 Pro$0.0112$11.25140.6×
Anthropic ClaudeClaude Sonnet 5$0.012$12.00150.0×
Google GeminiGemini 3.1 Pro$0.014$14.00175.0×
OpenAIGPT-5.6 Terra$0.0175$17.50218.7×
Anthropic ClaudeClaude Opus 4.8$0.03$30.00375.0×
OpenAIGPT-5.6 Sol$0.035$35.00437.5×
Anthropic ClaudeClaude Fable 5$0.06$60.00750.0×

Token counter

0 tokens

Token counts are exact for OpenAI models (tiktoken o200k_base, run in your browser). For other providers the count is an estimate — notably Claude Opus 4.7+/Sonnet 5 and similar newer models use a tokenizer that produces roughly 30% more tokens for the same text.

Instructions

  1. Set your token counts — enter the input tokens, output tokens, and requests per month for the workload you're pricing. The table above re-sorts every model by cost as you type.
  2. Count tokens from real text — paste a prompt, document, or system message into the token counter, then push the result into the calculator with "Use as input tokens" or "Use as output tokens".
  3. Add cached input tokens — if you reuse a long system prompt on every call, enter how many of your input tokens are cache reads.

Everything runs in your browser. Nothing you paste is uploaded or stored.

How the cost math works

Cost per call is the sum of three lines, each priced per 1M tokens:

  • uncached input tokens × the model's input rate
  • cached input tokens × the model's cache-read rate
  • output tokens × the model's output rate

Monthly cost is simply cost per call × requests per month.

Cached input tokens are treated as a subset of your input tokens, not an addition to them — enter 10,000 input and 8,000 cached, and you are billed for 2,000 tokens at the full input rate and 8,000 at the cache-read rate. If you enter more cached tokens than input tokens, the excess is ignored rather than double-counted.

The table sorts cheapest-first and tags the winner. The "× best price" column tells you what each model costs as a multiple of that cheapest option, which is usually the number that actually settles an argument — a model being "expensive" matters less than it being 40× the alternative that would have done the job.

Token counter

Paste text to count its tokens, then push the count into the calculator. Counts are exact for OpenAI models: the tool loads OpenAI's o200k_base tokenizer — the same BPE used by the GPT-4o/4.1/5 family — and runs it locally in your browser.

The tokenizer is a sizable download, so it loads only when you click into the text box. Until it finishes, the counter shows a rough character-based approximation labeled "quick estimate". Once loaded, the badge reads "exact" for OpenAI models and "estimate" for everyone else.

Per-provider calculators

Each provider has its own page with the same calculator scoped to just that provider's models:

Frequently asked questions

How accurate are the token counts?

Token counts are exact for OpenAI models — the o200k_base tokenizer runs locally in your browser. Other providers don't publish browser-ready tokenizers, so their counts are close estimates. The gap is not always small: newer Claude and Gemini models tokenize the same text into roughly 30% more tokens, which means a cost estimate for those models is optimistic by about the same margin. If you are choosing between a Claude model and an OpenAI model on price alone, weight that in.

Is my text sent anywhere?

No. Tokenizing and cost math run entirely in your browser. Nothing you paste is uploaded or stored.

How current is the pricing?

The rates the calculator uses were verified against each provider's official pricing page on the date shown above the table, and each provider's pricing page is linked there so you can check the current figure yourself. LLM API prices change often — confirm with the provider before committing a budget.

What about cached input and batch discounts?

The calculator applies a discounted cache-read rate for the providers that publish prompt-cache pricing. For providers that don't, cached tokens fall back to that model's normal input rate — so entering cached tokens for those models changes nothing, which is the honest answer rather than a phantom discount.

Batch APIs aren't applied automatically. Where a provider offers one, it is typically around 50% off, so halve the result if your workload runs through batch.

Which price should I actually plan against?

The per-call number is a poor guide on its own; the monthly column is where model choice shows up as real money. Two things routinely blow past the estimate: output tokens run longer than people expect, and retries are real requests. Price your workload with a realistic output length rather than a hoped-for one, and add headroom for the calls that fail and get retried.

Scaling AI content or ops? Elegant Atomics builds growth systems for B2B SaaS — Trevor’s company. Work with us →