Estimate and compare API token costs across Claude, GPT and Gemini. Free, instant, no signup.
Not sure how many tokens? Rough rule: 1 token ≈ 4 characters ≈ ¾ of a word.
| Model | $/1M in | $/1M out | Monthly cost |
|---|
Cheapest option is highlighted. Costs scale linearly with request volume.
| Model | $/1M input | $/1M output | Context |
|---|---|---|---|
| Claude Fable 5 | 10.00 | 50.00 | 1M |
| Claude Opus 5 | 5.00 | 25.00 | 1M |
| Claude Sonnet 5 | 2.00 | 10.00 | 1M |
| Claude Haiku 4.5 | 1.00 | 5.00 | 200K |
| GPT-5.6 | 5.00 | 30.00 | 1M |
| GPT-5.6 Terra | 2.50 | 15.00 | 1M |
| GPT-5.6 Luna | 1.00 | 6.00 | 1M |
| GPT-5.4 mini | 0.75 | 4.50 | 1M |
| GPT-5.4 nano | 0.20 | 1.25 | 1M |
| Gemini 3.1 Pro (preview) | 2.00 | 12.00 | 1M |
| Gemini 3.6 Flash | 1.50 | 7.50 | 1M |
| Gemini 3.5 Flash-Lite | 0.30 | 2.50 | 1M |
| Gemini 3.1 Flash-Lite | 0.25 | 1.50 | 1M |
Almost all LLM APIs bill per token, split into two rates: input (the tokens you send — your prompt and context) and output (the tokens the model generates). Output is usually several times more expensive than input, so long responses cost disproportionately more. Monthly cost is simply:
(input_tokens × in_rate + output_tokens × out_rate) ÷ 1,000,000 × requests_per_month
Comparing models on their rate card assumes every model uses the same number of tokens to do the same job. They do not. A cheaper model that needs a longer prompt to stay reliable, produces more verbose answers, or has to be retried when it gets something wrong can cost more per completed task than a model with a higher headline rate.
Reasoning models make this sharper still: thinking is billed as output, so a short visible answer can carry a large invisible cost. The comparison that decides anything is cost per successful task on your own workload, measured with real requests. The table above tells you the rates; only your evaluation tells you the token counts.
| Driver | Why it dominates |
|---|---|
| System prompts and tool schemas | Resent on every single request, invisible in the user-facing text |
| Conversation history | Grows each turn, so a long session costs progressively more per message |
| Retrieved context | Usually the largest block, and the easiest to over-fetch |
| Retries | Billed like any other request, and they cluster exactly when things go wrong |
Notice what these have in common: they are all input. Trimming responses is the intuitive saving, but for most production workloads input outweighs output several times over, and context discipline saves more than brevity.
Cache the stable prefix. Where the same system prompt or document is sent repeatedly, cached input is charged at a fraction of the standard rate. Put the fixed part first so it can be reused.
Batch anything that can wait. Evaluations, backfills and bulk classification do not need an answer in seconds, and asynchronous submission is billed at a lower rate.
Route by difficulty. Small tiers handle classification, extraction and routing well. Reserve the expensive model for the work that actually fails without it.
Cap output deliberately. Setting a sane maximum length bounds the most expensive tokens, and it also stops a runaway generation from turning one request into a large bill.
A quick heuristic: 1 token ≈ 4 English characters ≈ 0.75 words. For exact counts use a dedicated tokenizer/token counter tool.
Generation is more compute-intensive than reading context, so vendors price output tokens higher — often 3–5× the input rate.
Yes — several providers offer cached-input pricing that's a fraction of the standard input rate for repeated context. This tool models standard rates; cached workloads cost less.
Generating tokens is sequential — each one depends on the last — while reading a prompt can be processed in parallel. The compute profiles are different enough that vendors price them separately, typically with output several times the input rate.
Whichever is cheapest that still passes your evaluation. That is a real answer, not a deflection: model quality varies by task more than by reputation, and the rate gap between tiers is wide enough that testing the cheaper option is usually worth an afternoon. Build a small set of real examples, run the candidates, then use the table above to price the winner.