How API pricing works
Anthropic, OpenAI and Google all charge per token, priced per million tokens, with separate prices for input (what you send) and output (what the model writes back). On most models here output costs 4 to 8 times as much as input, and it includes the thinking tokens a reasoning model uses before it answers.
Example: a request with 3,000 input tokens and 500 output tokens on Claude Sonnet 5.5 ($2 input, $10 output per million) costs 3,000 × $2 / 1,000,000 = $0.006 for input plus 500 × $10 / 1,000,000 = $0.005 for output, so $0.011. At 1,000 requests a day that is $11 a day, or $330 over a 30-day month.
How prompt caching lowers the bill
If many requests start with the same text, such as a long system prompt or a document, the provider can keep that part in a cache and charge a much lower price to read it again. On the models here a cache read costs 2.5% to 10% of the normal input price, depending on the model.
In the example above, if 80% of the input is read from cache, Sonnet 5.5 charges 600 fresh tokens at $2 ($0.0012), 2,400 cached tokens at $0.10 ($0.00024) and the same $0.005 for output: $0.00644 a request, or $193.20 a month instead of $330. Writing to the cache can cost extra (Anthropic charges 1.25 times the input price for a 5-minute cache, and OpenAI does the same on GPT-5.6 and later), which this calculator leaves out.
Long prompts and announced price changes
Some models charge more once a single prompt passes a size limit: Claude Haiku 5.5 above 100,000 input tokens, Gemini 3.1 Pro Preview and Gemini 2.5 Pro above 200,000, and the GPT models here above 272,000. The calculator uses the base price and tells you when your prompt is over the limit.
Google has announced that Gemini 4 Argon doubles in price on December 1, 2026 ($4 input, $20 output) and Gemini 3.8 Flash on January 1, 2027 ($1.50 input, $7.50 output). Prices here are the ones in effect on the date they were checked.
Questions
How many tokens is a word?
Roughly 1 token for every 0.75 English words, so 1,000 tokens is about 750 words. Google says 100 tokens is about 60 to 80 English words, and Anthropic says Claude 4.7 and later models produce about 30% more tokens for the same text than older Claude models.
Do thinking or reasoning tokens cost extra?
They are billed as output tokens at the normal output price on all three providers. A model that thinks for a long time can use far more output tokens than its visible answer.
Is the Batch API cheaper?
Yes. Anthropic, OpenAI and Google each charge about half the standard price for batch requests that can wait for a result. This calculator shows standard prices.
Which is the cheapest model?
It depends on your mix of input and output. On the default example, Gemini 2.5 Flash-Lite, Claude Haiku 5.5 and GPT-6 Luna are the cheapest, but output-heavy workloads can change the order.
Why might my real bill be higher than this?
Long prompts above a model's price tier, cache write and storage fees, tools such as web search, and US-only or regional processing (10% extra on Anthropic and OpenAI) all add to the token prices shown here.
Is there a free tier?
Google's Gemini API has a free tier for some models with lower rate limits, and data sent on it may be used to improve Google's products. The prices here are paid-tier prices.
Sources
- Anthropic: Claude API pricing
- OpenAI: API pricing
- Google: Gemini Developer API pricing
- OpenAI: Key concepts (tokens)
- Google: Understand and count tokens
- OpenAI: Prompt caching
Updated November 3, 2026. Estimates only, not tax or financial advice.