GPT, Claude, and Gemini do not cost the same once you look at real token math, especially when output is heavy. The cheapest choice depends on the mix of input and output tokens, not the brand name on the API key.
Why “which model is cheapest?” is the wrong first question
If you compare models by a single headline number, you will get misled fast. LLM pricing is split into input and output tokens, and many coding workflows produce far more output than you expect, especially when the model explains, refactors, or reasons out loud.
The right question is: what is the blended cost for your workload? A code review bot, a chat assistant, and a background agent all burn tokens differently. That is why the AI Cost Index is useful, because it compresses the market into a single blended view, while still letting you inspect the underlying prices when you need to.
For a quick market snapshot, the AI Cost Index currently shows $4.64 per 1M tokens for the Frontier basket and $0.74 per 1M tokens for the Budget basket, both blended 3:1 input:output. That is not a model price, it is a basket price, which makes it a better sanity check than a random comparison chart.
The current price sheet, without the marketing fog
Here are the specific model prices you can actually use in calculations. Every figure below is per 1,000,000 tokens.
| Model | Input | Output |
|---|---|---|
| gpt-4o | $2.5 | $10 |
| gpt-4o-mini | $0.15 | $0.6 |
| claude-3-5-haiku | $0.8 | $4 |
| claude-sonnet-4-5 | $3 | $15 |
| claude-opus-4-1 | $15 | $75 |
| gemini-2.5-flash | $0.3 | $2.5 |
| gemini-2.5-pro | $1.25 | $10 |
| deepseek-chat | $0.28 | $0.42 |
If you want live updates beyond this snapshot, check live prices for 4,292 models. Prices move, but the math does not.
Worked example: the same task, three very different bills
Let’s say your coding agent uses 120,000 input tokens and 30,000 output tokens on one task. That is a pretty normal shape for a real developer workflow, because the prompt includes repo context, and the output includes code, explanations, and maybe a few retries.
Now compute the cost for a few models using the standard formula:
cost = (input_tokens / 1,000,000) * input_price + (output_tokens / 1,000,000) * output_price
For gpt-4o:
(120,000 / 1,000,000) * 2.5 = 0.30
(30,000 / 1,000,000) * 10 = 0.30
Total = $0.60
For claude-sonnet-4-5:
(120,000 / 1,000,000) * 3 = 0.36
(30,000 / 1,000,000) * 15 = 0.45
Total = $0.81
For gemini-2.5-flash:
(120,000 / 1,000,000) * 0.3 = 0.036
(30,000 / 1,000,000) * 2.5 = 0.075
Total = $0.111
That is the part people miss, output tokens can dominate the bill even when the input is larger. In this example, output is only one quarter of the token volume, but it still contributes half the gpt-4o cost and most of the Claude Sonnet cost.
Where the expensive models make sense
Cheaper does not always mean better value. A model with a lower price can still be a bad deal if it takes more retries, produces weaker code, or needs more context to get the same result. That is why I like a value lens, not just a price lens, and why the value-for-money view is more useful than a raw leaderboard.
Here is the practical rule of thumb for developers:
- Use low-cost models for autocomplete, simple transformations, and high-volume background tasks.
- Use mid-tier models when you need better instruction following, cleaner code, or fewer retries.
- Use premium models when correctness, deep reasoning, or hard debugging saves more time than the extra token spend.
That is why comparing gpt-4o-mini to claude-opus-4-1 as if they are substitutes is usually nonsense. They can both write code, but they are not priced for the same job.
What the baskets tell you about the market
The AI Cost Index is useful because it strips away model-specific noise and gives you a blended market signal. The Frontier basket at $4.64 per 1M tokens and the Budget basket at $0.74 per 1M tokens show a wide gap, but not an infinite one. That gap matters when you are deciding where to spend your prompt budget.
One easy way to read the baskets is this: if your workflow behaves like a frontier workload, you should expect premium economics. If it behaves like a budget workload, you can often keep costs low without sacrificing throughput. The trick is knowing which bucket your app actually belongs in.
There is also a strategic angle here. If your product relies on frequent, low-stakes calls, you want a model that stays cheap at scale. If your product relies on fewer, high-value calls, a pricier model can still be the better business decision. The basket view helps you separate those cases before you ship yourself into a surprise bill.
How to track this without guessing
Guessing your AI spend from the outside is a good way to miss the real cost drivers. If you want the actual numbers, use the State of AI page for broader context, then track your own usage locally.
To try it, run npx mytokentracker. It reads the usage logs coding agents already keep on your machine, prints a 30-day cost table at API prices, and keeps the usage data on your device. No account is needed for that local view.
If you want a dashboard, create a free account and run npx mytokentracker init. It asks for the API token, uploads history, then syncs every 30 minutes. It works with Claude Code, Codex, GitHub Copilot CLI, Antigravity, OpenCode, Amp, Qwen Code, and more. Only daily totals per agent and model are uploaded, never prompts, code, or file names.
It also captures cost, input, output, cache, reasoning tokens, latency, and success, broken down by provider, model, platform, and use-case. If you use OpenAI, Anthropic, Gemini, or Mistral directly, the drop-in wrappers can auto-capture usage. For anything else, a single POST to the events API is enough.
What developers should actually optimize
The cheapest model on paper is not always the cheapest workflow in practice. What you want to optimize is cost per successful task, because failed attempts, retries, and bloated prompts all distort the real bill.
That leads to a better checklist:
- Measure input and output separately.
- Watch cache hit rate, because cached tokens can change the economics.
- Track success rate, not just token count.
- Compare models on the same task shape, not on synthetic prompts.
- Review the result weekly, because usage patterns drift fast.
If you want the raw community picture, the open data is available under CC BY 4.0, and you can explore it through the open data set. That is useful when you want to sanity-check your own spend against what other developers are actually doing.
FAQ
Is the cheapest model always the best choice?
No. The cheapest model is only best if it solves the task with acceptable quality and fewer retries. If a slightly pricier model finishes in one shot while the cheap model needs three tries, the expensive one can be the better buy.
Why do output tokens matter so much?
Because output is often priced higher than input, and many coding workflows generate a lot of it. Explanations, diffs, reasoning, and regenerated code can make output the dominant part of the bill even when the prompt is larger.
How do I compare models fairly?
Use the same task, the same prompt shape, and the same success criteria. Then compute cost from actual input and output tokens. If you need broader market context, use the live model list at /models and the blended index at /cost-index.
If you want to see your own numbers instead of guessing, run npx mytokentracker and check the 30-day cost table on your machine.