Free tool

AI token cost calculator for Claude, OpenAI and Gemini models

AI token cost calculator for Claude, OpenAI and Gemini: paste a prompt or enter token counts to estimate one request and a month of requests, with cached input.

  • Free, no sign-up
  • Runs in your browser
  • Nothing uploaded

Cheapest for this workload -
ModelInput / output per 1MPer requestPer dayPer month (30 days)

Prices in US dollars at standard rates, checked on 22 October 2026 from each provider's pricing page. Per request includes cache reads and cache writes. Token counts from text are estimates; use each provider's token counter for exact numbers.

Runs in your browser. Nothing you type or upload is sent to our server.

AI APIs bill by the token, with separate prices for input, output, cached input and, on Claude, cache writes. This calculator turns your text or token counts into an estimated cost per request, per day and per month, so you can compare models before you build. Prices were checked against each provider’s official pricing page on 22 October 2026. They change often, so confirm on the provider page before you set a budget.

How do I use this tool?

  1. Paste your prompt to get an estimated token count, or type exact input and output token counts if you have them.
  2. Enter the expected output length in tokens.
  3. If you use prompt caching, enter the share of input tokens read from cache and the share written to cache. For Claude models, choose a 5-minute or 1-hour cache duration.
  4. Enter requests per day. The tool multiplies by 30 for a monthly figure.
  5. Choose providers, tick Use the Batch API if the work can wait, and open older models only if you need them. The table lists matching models, sorted by monthly cost.

How is the cost worked out?

Each request’s input splits into three parts: uncached tokens, cache reads and cache writes. Their shares add up to 100% of the input tokens.

Cost per request = (uncached input x input price + cache reads x cache read price + cache writes x cache write price + output x output price) / 1,000,000. Prices are in US dollars per million tokens (MTok).

  • Claude cache writes cost 1.25 times the input price for a 5-minute write and 2 times for a 1-hour write. The Anthropic pricing page lists the exact figure for each model, and the calculator uses it.
  • OpenAI and Google list no separate cache-write price, so written tokens are billed at the normal input rate. Google also bills context cache storage per hour, which this calculator does not include.
  • Batch halves the cost of input, output and cache usage. Anthropic, OpenAI and Google each list batch prices at half the standard rate.
  • Totals: daily cost = cost per request x requests per day. Monthly cost = daily cost x 30.
ModelInput / MTokCache read / MTokCache write / MTok (5 min / 1 hour)Output / MTok
Claude Fable 5.1$10$0.25$12.50 / $20$50
Claude Opus 5.5$4$0.20$5 / $8$20
Claude Sonnet 5.5$2$0.10$2.50 / $4$10
Claude Haiku 5.5 (prompt up to 100k tokens)$0.10$0.01$0.125 / $0.20$0.50
GPT-6 Astra (up to 272k tokens)$10$1Not listed, billed at input rate$50
GPT-6.1 Sol (up to 272k tokens)$2$0.10Not listed, billed at input rate$10
Gemini 4 Argon (until 30 Nov 2026)$2$0.10Not listed, billed at input rate$10
Gemini 3.8 Flash (until 31 Dec 2026)$0.75$0.075Not listed, billed at input rate$3.75

Sources: Anthropic pricing, OpenAI API pricing and Gemini API pricing. Some models switch to higher rates above a prompt length threshold, and two Gemini models have announced price rises; the calculator applies these automatically. Claude Mythos models are limited availability and are not listed. Retired Claude models are not listed either.

Worked example: no caching

A support bot sends 3,000 input tokens and gets 500 output tokens back, 1,000 times a day, on Claude Sonnet 5.5 with no caching.

  • Input: 3,000 x $2 / 1,000,000 = $0.006
  • Output: 500 x $10 / 1,000,000 = $0.005
  • Per request: $0.011. Per day: $11. Per 30 days: about $330.

Worked example: cache reads and cache writes

Same bot, 3,000 input tokens and 500 output tokens. Half the input (1,500 tokens) is read from cache. A fifth (600 tokens) is written to a 5-minute cache. The remaining 900 tokens are uncached.

  • Uncached: 900 x $2 = $1,800
  • Cache read: 1,500 x $0.10 = $150
  • Cache write: 600 x $2.50 = $1,500
  • Output: 500 x $10 = $5,000
  • Per request: $8,450 / 1,000,000 = $0.00845. Per day: $8.45. Per 30 days: about $253.50.

Without caching the same request costs $0.011, so the cache saves money here once the prefix is reused.

How accurate is the token estimate?

Text estimates are rough. OpenAI says 1 token is about 4 characters or 0.75 words of English text, and Google says the same 4 characters for Gemini. Anthropic says 1M tokens is roughly 2.5M characters on the tokenizer used by Claude Opus 4.7 and later, and that this tokenizer produces about 30% more tokens than older Claude models for the same text. So the calculator uses about 2.5 characters per token for current Claude models, about 4 for OpenAI and Gemini, and a word-based estimate for older Claude models. For exact counts, use the provider tools: Anthropic’s free /v1/messages/count_tokens endpoint, OpenAI’s tokenizer or tiktoken, and Gemini’s countTokens.

Common mistakes

  • Ignoring output tokens. Output often costs 5 times the input price or more, so long answers drive the bill.
  • Forgetting thinking tokens. Reasoning output is billed as output; Google states this for Gemini.
  • Reusing old token counts. Counts from older Claude models can be about 30% low on current ones.
  • Leaving out conversation history. In a chat, every earlier turn is sent again as input.
  • Treating cache writes as free. Writing to Anthropic’s cache costs 1.25 times normal input for 5 minutes, or 2 times for 1 hour. Caching only pays off when the same prefix is read again.
  • Missing long-context prices. Claude Haiku 5.5 charges more above 100,000 prompt tokens, and GPT-6 Astra and other OpenAI models above 272,000.

Tips to cut cost

  • Cache long, repeated prefixes such as system prompts and reference documents.
  • Use the Batch API for work that can wait; Anthropic, OpenAI and Google each list half price for batch.
  • Route simple tasks to a small model and keep the large model for hard ones.
  • Cap output length and ask for short formats.

These figures are estimates for planning only, not a quote. Taxes, regional pricing, data residency multipliers, fast or priority tiers and tool fees are not included. If you are planning an AI feature or agent, see our AI automation service, or read what is Claude Code to see how coding agents use tokens.

Last updated: October 22, 2026

Questions, answered

Questions about the AI Token & Cost Calculator.

Still unsure? Ask the developer directly on a free 30-minute call.

Book a free consultation
How many characters are in a token?

For English text OpenAI and Google both say about 4 characters per token. Anthropic says current Claude models fit roughly 2.5 million characters in 1 million tokens, so Claude counts tend to run higher.

How much does Claude cost per million tokens?

As of 22 October 2026 Claude Opus 5.5 costs 4 dollars input and 20 dollars output per million tokens, Sonnet 5.5 costs 2 and 10, and Haiku 5.5 costs 0.10 and 0.50 for prompts up to 100,000 tokens. Check the Anthropic pricing page for current rates.

How do I get an exact token count for Claude?

Use the Anthropic token counting endpoint at /v1/messages/count_tokens. It is free to use, subject to rate limits, and returns an estimate that is very close to billed usage.

What is cached input pricing?

When a repeated prompt prefix is read from the prompt cache, those tokens cost less than normal input. On current Claude models a cache read costs between 2.5 and 10 percent of the base input price, depending on the model.

What does a cache write cost on Claude?

Writing a prompt prefix to the cache costs 1.25 times the input price for a 5-minute cache and 2 times for a 1-hour cache. You pay this once per write, so caching pays off when the same prefix is read again.

Do OpenAI and Gemini charge extra for cache writes?

Their pricing pages list no separate cache-write price, so written tokens are billed at the normal input rate. Google also charges for cache storage per hour, which this calculator does not include.

Are output tokens more expensive than input tokens?

Yes. On current models output costs about 5 to 8 times the input price, so the length of the answer has a big effect on cost.

Does the Batch option lower the cost?

Yes. Anthropic, OpenAI and Google each list batch prices at half the standard rate. Batch suits work that can wait, not live chat.

Does the calculator include thinking tokens?

Only if you add them to the output count. Reasoning or thinking tokens are billed as output, so add an allowance if your model thinks before answering.

Why do my real costs differ from this estimate?

Text based token counts are rough, and real bills include conversation history, tool definitions, long-context surcharges and any regional or data residency multipliers.

Is this calculator official?

No. It is an independent estimate built from the published price pages of Anthropic, OpenAI and Google. Always confirm prices with the provider before you set a budget.

Your developer Jamshaid Ali Founder, Handicraft Marketing

Need a tool like this built for your business?

We build fast WordPress sites, custom calculators and software that run your daily work. Tell us what you need and get a clear plan within 24 hours.

  • Reply within 24 hours
  • Free plan, no obligation
  • Talk directly to the developer
Direct WhatsApp
Book Free Consultation