AI API Cost Calculator
How much does the Claude, GPT or Gemini API cost? Estimate your monthly spend in seconds based on your real usage.
Reference prices per million tokens (2026)
| Model | Input (per 1M tokens) | Output (per 1M tokens) | Best for |
|---|---|---|---|
| Claude Haiku | ~$1 | ~$5 | Real-time chat, classification, high volume |
| Claude Sonnet | ~$3 | ~$15 | Coding, agents, daily professional use |
| Claude Opus | ~$15 | ~$75 | Deep reasoning, critical tasks |
| GPT (standard) | ~$2.5 | ~$10 | General purpose, multimodal |
| Gemini (standard) | ~$1.25 | ~$10 | Huge contexts, Google ecosystem |
โ ๏ธ Reference prices in USD, subject to change: labs update them frequently (usually downward). Always verify on the official pages of Anthropic, OpenAI and Google before budgeting a project. Prompt caching and batch discounts can cut the bill by up to 90%.
3 tricks to pay less for the API
- Default to the small model. 80% of tasks don't need the big model: route to Haiku and escalate to Sonnet or Opus only when needed.
- Enable prompt caching. If you repeat the same context (instructions, documents), caching cuts those tokens' cost by up to 10x.
- Batch what can wait. Batch APIs offer ~50% discounts for anything that doesn't need an immediate response.
Not sure which model to plug into this calculator yet? Answer 5 questions in our Claude model selector to find out whether Haiku, Sonnet, or Opus fits before you run the numbers.
Not using the API yet? Start free with Claude's consumer plans and make the jump when volume justifies it.
Cost is only half the equation: our time savings calculator shows how many hours and how much money automating tasks with AI actually saves you, so you can weigh spend against real savings.
What a token actually is, and why billing works this way
AI APIs don't charge per question or per minute: they charge per token. A token is the unit the model chops text into, and it doesn't line up with words. In English the rule of thumb is that one token is roughly four characters, so an average word is about 1.3 tokens and a full page of text lands around 500-700. Rare words, proper nouns and code get split into more pieces than ordinary prose, which is why the same number of characters of code costs more than the same amount of writing.
The second thing that surprises everyone is that input and output don't cost the same. Generating text is computationally far more expensive than reading it, and that difference shows up on the bill: in pricing tables, output typically costs three to five times what input costs. The practical consequence is counterintuitive โ feeding the model a long document is usually cheap; asking it to write at length is not. If your use case is summarising, classifying or extracting data from documents, your bill will be much lower than the volume of text you handle would suggest.
The costs this calculator can't see
A token estimate is a good starting point, but three things escape it and they matter in production.
The whole context is resent on every turn. In a conversation the API remembers nothing by itself: your application resends the entire history with each call. That means the cost of a conversation doesn't grow linearly, it grows quadratically. A twenty-turn chat doesn't cost twenty times the first turn โ it costs considerably more. This is the number one cause of unexpected bills, and it's also why the prompt caching mentioned above has such an outsized impact: it caches exactly the part that repeats.
Retries count. Every call that fails on malformed output, every validation that forces a repeat, and every time the model drifts from the schema you expected is a billed call. In a poorly tuned system, retries can be 20-30% of spend. Tightening the prompt so it lands first time is a cost optimisation as much as a quality one.
Reasoning models generate tokens you never see. Extended thinking modes produce an internal reasoning block before the final answer, and that block is billed as output even though it never appears on screen. It can multiply the cost of a request several times over. Use those modes where the reasoning genuinely adds something, not by default.
API or subscription? The sum almost nobody does
Before budgeting an integration, check whether you actually need the API at all. A flat monthly subscription covers one person's interactive use with no practical limit and no risk of a surprise invoice. The API makes sense when one of three things is true: your volume exceeds what a person can consume by hand, you need the process to run with nobody sitting in front of it, or you want the model inside your own product.
The common mistake is buying API access and then using it like a chat window. If you're going to write the prompts yourself, one at a time, the chat is cheaper and more pleasant. If you're going to process a thousand documents overnight, the API is the only option. And if you're somewhere in between, start with the chat, measure how many times a day you repeat the same operation, and switch when the number justifies it. The time savings calculator helps put figures on the other side of the scale.
How to use this estimate well
Treat the result as a range rather than a fixed budget, and add margin: in our experience, multiplying the initial estimate by 1.5 gets much closer to a real first month, because the early days always include testing, retries and prompts that aren't tuned yet. Once the system settles, actual consumption usually drops below the estimate.
Above all, verify prices at the source before committing a budget. The figures in the table are indicative and the industry revises them often, almost always downwards. If you're still unsure which model to put into the calculator, the model selector settles it in a few questions, the AI models table has the full comparison, and the Claude vs ChatGPT vs Gemini comparison goes into the capability differences that justify paying more.