Skip to content

AI token calculator: tokens and API cost per model

A token is the small piece of text an AI model reads and bills for, often part of a word. In our test on October 28, 2026, Claude used one token per 3.2 characters of English and OpenAI's tokenizer one per 4.9, so 1,000 English words came to about 1,700 Claude tokens and 1,100 OpenAI tokens. Paste your text below for the count and the API cost on each model.

Updated

Token calculator

Paste a prompt, a document, an email thread or code.

Runs in your browser. Nothing you paste leaves this page, and our page analytics are set to mask this tool. The only download is the OpenAI tokenizer (about 1 MB) from our own site, once.

Models to compare

OpenAI

Anthropic (Claude)

Google (Gemini)

More models (14)

Paste text or enter a word count to see the tokens and the cost.

How does this token calculator count tokens?

Every LLM token calculator has to answer one question first: whose tokenizer? Each AI company splits text its own way, so the same paragraph is a different number of tokens on each model. This one uses the best method each company allows and labels every number with it.

  • OpenAI models: exact count. As an OpenAI token calculator it runs OpenAI's o200k_base tokenizer in your browser, through the open-source gpt-tokenizer library (version 4.0.0). OpenAI's own tokenizer library, tiktoken, maps GPT-4o, GPT-4.1 and every GPT-5 model to o200k_base.
  • GPT-6 models: the same tokenizer, not yet confirmed. tiktoken has no GPT-6 entry on October 28, 2026, and OpenAI has not said which tokenizer GPT-6 uses. A public comparison of 31 texts, run on September 26, 2026, found GPT-6 Astra, Sol and Luna reporting exactly the same input counts as GPT-5.5, so we count them with o200k_base and label them that way.
  • Claude models: our measured estimate. Anthropic offers no tokenizer that runs offline, so the Claude token calculator divides your characters by the ratio we measured for that kind of text (table below). Anthropic's pricing page says Claude 4.7 and later models share one newer tokenizer, and in our test Haiku 5.5, Sonnet 5.5 and Opus 5.5 agreed within 4 tokens.
  • Gemini models: Google's rule. As a Gemini token calculator it uses Google's own rule of thumb of about 4 characters per token. We did not measure Gemini, because that needs a Google API key.
  • Other models (Grok, DeepSeek, Qwen, Mistral, Kimi and the rest): there is no tokenizer for them in the browser, so the calculator shows the OpenAI count as a stand-in and labels it.

How we measured Claude

On October 28, 2026 we sent six texts through Claude Code 2.1.303 with Claude Haiku 5.5, from an empty folder with every tool switched off, and read the input tokens in its JSON output. The same request without the text (a fixed one-line instruction) came to about 4,008 tokens, measured four times. Subtracting it leaves the tokens of the text itself. The English text and the code ran twice and matched within 5 tokens, and Claude Sonnet 5.5 and Opus 5.5 got the same two texts as a cross-check.

Kind of textCharactersClaude tokensCharacters per Claude tokenOpenAI tokensCharacters per OpenAI tokenClaude vs OpenAI
English prose1,3184103.212684.921.53x
Spanish prose1,465558.52.623244.521.72x
Portuguese prose1,463577.52.533244.521.78x
French prose1,536603.52.553414.51.77x
Code1,6627502.225213.191.44x
Table or data766499.51.533901.961.28x

Claude needed 1.28 to 1.78 times as many tokens as OpenAI for the same text: the fewest extra for the table, the most for Portuguese. That fits the public comparison above, where Claude Opus 5.5 counted 53.9% more tokens than GPT-5.5 across its 31 texts. One sample per kind of text gives a rule of thumb, not a guarantee: for an exact Claude count, Anthropic's token counting endpoint is free to use with an API key.

Nothing you paste leaves the page. The counting and the cost math run in your browser, the tool is masked from our page analytics, and the only file it downloads is the OpenAI tokenizer (about 1 MB), from our own site.

What does the calculator show?

The capture below is this calculator with our English test text (1,316 characters and 239 words; the table above counts 2 more characters for the line break the test added), the six models it opens with, a 300-word reply and 100 requests a day. OpenAI's tokenizer counted 268 tokens, our Claude estimate came to 409 and Google's rule to 329 for Gemini. GPT-6 Luna was cheapest at $0.000195 a request ($0.584 a month); Claude Opus 5.5 cost the most at $0.0119 a request ($35.81 a month), about 61 times as much.

The token calculator with our English test text and six models, cheapest first: GPT-6 Luna at 268 input tokens and $0.000195 a request ($0.584 a month), Claude Haiku 5.5 at 409 tokens and $0.000298, Gemini 3.8 Flash at 329 tokens and $0.0018, GPT-6.1 Sol at $0.0039, Claude Sonnet 5.5 at $0.00597 and Claude Opus 5.5 at $0.0119 a request ($35.81 a month)
Our own capture of this calculator on October 28, 2026, at list prices, 100 requests a day. Your figures depend on the text, the models and the volume you enter.

What does a token cost on each model?

These are list prices in US dollars per 1 million tokens, input and output, for the 26 language models in the calculator, each from the vendor's own pricing page (one exception: Meta prices no API for Muse Spark Open, so its row shows the endpoint price Artificial Analysis lists). Most were read for our AI model leaderboard on October 18, 2026; on October 28, 2026 we re-read the OpenAI, Anthropic and Google pages and they still matched. Output costs 2 to 6 times as much as input on every model here, so a long answer costs more than a long prompt.

ModelInput per 1MOutput per 1MNotesCheckedSource
GPT-6 Astra$10$50Cached input $1 per 1M tokens. Maximum input is 922,000 tokens of the 1,050,000-token window. Over 272,000 input tokens: $20 / $75 per 1M.October 18, 2026developers.openai.com
GPT-5.5$5$30Over 272,000 input tokens: $10 / $45 per 1M.October 28, 2026developers.openai.com
GPT-6.1 Sol$2$10Cached input $0.10 per 1M tokens. Over 272,000 input tokens: $4 / $15 per 1M.October 18, 2026developers.openai.com
GPT-5.4 mini$0.75$4.50October 28, 2026developers.openai.com
GPT-4o mini$0.15$0.60October 28, 2026developers.openai.com
GPT-6 Luna$0.10$0.50Cached input $0.01 per 1M tokens. Over 272,000 input tokens: $0.20 / $0.75 per 1M.October 18, 2026developers.openai.com
Claude Fable 5.1$10$50Prompt cache reads cost 2.5% of the base input price; Batch API is 50% off.October 18, 2026platform.claude.com
Claude Opus 5.5$4$20Cache reads $0.20 per 1M tokens. Fast mode (up to 2.5x speed) is $8 input / $40 output per 1M tokens.October 18, 2026platform.claude.com
Claude Sonnet 5.5$2$10Prompt cache reads cost 5% of the base input price; Batch API is 50% off.October 18, 2026platform.claude.com
Claude Haiku 5.5$0.10$0.50Anthropic lists this as a starting ("from") price. Over 100,000 input tokens: $0.50 / $2.50 per 1M.October 18, 2026platform.claude.com
Gemini 4 Argon$2$10Introductory price through November 30, 2026; $4 input / $20 output per 1M tokens from December 1, 2026. Context window is shared by input and output (up to 1M output tokens with long decode).October 18, 2026ai.google.dev
Gemini 3.8 Flash$0.75$3.75Price applies through December 31, 2026; $1.50 input / $7.50 output per 1M tokens from January 1, 2027.October 18, 2026ai.google.dev
Qwen3.8 Max$2$6Alibaba Cloud Model Studio, Singapore (international) price for inputs up to 1M tokens.October 18, 2026alibabacloud.com
Qwen3.8 27B$0.50$3Price on Alibaba Cloud Model Studio (Singapore); the weights are free to download and self-host.October 18, 2026alibabacloud.com
DeepSeek V4 Pro$1.32$3.96Peak-hour price; off-peak rates are half ($0.66 / $1.98). Cache-hit input $0.044 at peak.October 18, 2026api-docs.deepseek.com
DeepSeek V4.1 Flash$0.30$1.20Peak-hour price; off-peak rates are half ($0.15 / $0.60). Cache-hit input $0.006 at peak.October 18, 2026api-docs.deepseek.com
Muse Wonder$4$20API model ID muse-wonder-1.0; cached input $0.20 per 1M tokens. The stronger Muse Wonder Full is only included in Muse Code subscriptions.October 18, 2026dev.meta.ai
Muse Spark 1.3$1.25$4.25Model ID muse-spark-1.3; cached input $0.15. A muse-spark-1.3-contributor variant ($0.10 / $0.20) may be used to improve Meta products.October 18, 2026dev.meta.ai
Muse Spark Open$1.25$4.25Open weights (Hugging Face repo meta-models/Muse-Spark-Open-816B-A42B). Meta lists no per-token price; this is the endpoint price shown by Artificial Analysis.October 18, 2026artificialanalysis.ai
MiniMax-M3$0.30$1.20Discounted standard price for prompts up to 512K tokens (list price $0.60 / $2.40); $0.60 / $2.40 above 512K tokens.October 18, 2026platform.minimax.io
Mistral Large 4$1.36$4.18Regular price; Mistral showed a half-price launch sale ($0.68 / $2.09, cached input $0.07) at the time of this snapshot.October 18, 2026docs.mistral.ai
Kimi K3$3$15Cache-hit input $0.30 per 1M tokens; cache writes $3 (5-minute TTL) or $6 (1-hour TTL).October 18, 2026platform.kimi.ai
Grok 4.7$2$6For prompts under 200K tokens. Prompts of 200K tokens or more are billed at $4 input / $12 output per 1M tokens. Cached input $0.50.October 18, 2026docs.x.ai
MiMo-V2.6-Pro$0.435$0.87Overseas real-time API price; cache-hit input $0.0036 per 1M tokens. A faster UltraSpeed tier costs 10x more.October 18, 2026mimo.mi.com
GLM-5.3$1.40$4.40Cached input $0.26 per 1M tokens. Z.ai also sells a GLM Coding Plan subscription.October 18, 2026docs.z.ai
GLM-5.3-Flash$0.15$0.50Cached input $0.03 per 1M tokens.October 18, 2026docs.z.ai

The calculator uses list prices only. Batch processing is half price at Anthropic and at OpenAI, whose pricing page lists batch rates at half the standard ones for the GPT-6 models, and cached input costs a fraction of the list price, so a real bill can be lower.

How do you cut token costs?

Five habits do most of the work, and each one shows in the calculator: change the reply length, the model or the text and watch the monthly figure move.

  • Cache what every request repeats. If your requests start with the same instructions or document, prompt caching bills the repeat at a fraction of the input price: 5% on Claude Opus 5.5 and Sonnet 5.5 (Anthropic), and $0.10 instead of $2 per million tokens on GPT-6.1 Sol (OpenAI). Claude Code already does it: even with its tools switched off, it sent 3,200 to 4,000 tokens of its own instructions with each one-line request in our test, and after the first request most of them were counted as cache reads.
  • Batch what can wait. Reports, tagging and summaries that can arrive within hours cost half as much through Anthropic's Batch API and OpenAI's batch rates.
  • Test the smaller model first. Claude Haiku 5.5 lists $0.10 / $0.50 per million tokens against $4 / $20 for Claude Opus 5.5, 40 times less. Run a handful of your real requests on both before you settle on the big one.
  • Stay under the long-prompt line. Claude Haiku 5.5 charges 5 times as much for prompts over 100,000 tokens, and the GPT-6 models charge double for input and 1.5 times for output above 272,000 input tokens. Paste the part of a document the task needs, not the whole file, and trim old chat history.
  • Ask for shorter answers. Output costs 2 to 6 times as much as input, so say the length you want ("three bullet points") and set a maximum output in the API. Models that think before answering bill that thinking as output too: Google's pricing page labels its output price "including thinking tokens".

If you use Claude Code on a subscription rather than the API, tokens show up as usage limits instead of a bill; our guide to Claude Code usage limits explains the 5-hour and weekly caps and how to make them last.

Frequently asked questions

How many tokens is 1,000 words?

In our test, 1,000 words of English came to about 1,100 tokens on OpenAI's tokenizer and about 1,700 on Claude. Spanish, Portuguese and French ran higher: about 1,200 to 1,300 OpenAI tokens and 2,100 to 2,300 Claude tokens per 1,000 words. Google's rule for Gemini gives about 1,400 tokens for the same English text.

Why does Claude count more tokens than GPT for the same text?

Each company trains its own tokenizer, and Claude's cuts text into smaller pieces: in our test it needed 1.28 to 1.78 times as many tokens as OpenAI's for the same text. So compare the cost per request in the calculator, not the price per token: a lower price per token can still mean a higher bill.

Is the token count the same as my bill?

Close, but the API also counts what wraps your text: the system prompt, tool definitions and message formatting. Models that reason also bill their thinking as output. In our Claude Code test, a one-word prompt came to 3,998 input tokens; the usage numbers in each API response are the real bill.

Does this token calculator send my text anywhere?

No. The counting and the cost math run in your browser, and the tool is masked from our page analytics (Microsoft Clarity), so your text is not recorded. The only download is the OpenAI tokenizer file, about 1 MB, fetched from our own site the first time you type.

How do I get an exact Claude or Gemini count?

Ask the vendor's own counter. Anthropic's token counting endpoint is free to use with an API key, and the Gemini API has a countTokens call; both count with the tokenizer of the model you name. Without a key, the ratios we measured here are the closest estimate.