AI status

Token counter

Count the tokens in a piece of text for the model you are about to send it to.

0Characters
0Words

This tool runs entirely in your browser. Your text is never sent to this site or to a model vendor, never stored and never logged.

Estimate the monthly cost of sending text this length on every model.

OpenAI

Exact count (GPT-5 family); GPT-6 is an estimate

OpenAI models: token count and estimated input cost for the text above
ModelContextTokensEst. input cost
GPT-5.6 Luna1.05M0$0.00
GPT-5.4 nano400K0$0.00
GPT-5.4 mini400K0$0.00
GPT-5.6 Terra1.05M0$0.00
GPT-5.6 Sol1.05M0$0.00
GPT-6 AstraEstimate1.05M0$0.00

OpenAI prices:Source: developers.openai.com/api/docs/pricingVerified Second sourceHistory

Anthropic

Estimate

Anthropic models: token count and estimated input cost for the text above
ModelContextTokensEst. input cost
Claude Haiku 4.5Earlier tokenizer200K0$0.00
Claude Sonnet 5Newer tokenizer1M0$0.00
Claude Opus 5Newer tokenizer1M0$0.00
Claude Fable 5.1Newer tokenizer1M0$0.00

Anthropic prices:Source: platform.claude.com/docs (pricing)Verified Second sourceHistory

Google

Estimate

Google models: token count and estimated input cost for the text above
ModelContextTokensEst. input cost
Gemini 3.5 Flash-Lite1,048,5760$0.00
Gemini 2.5 Flash1,048,5760$0.00
Gemini 3.8 Flash1,048,5760$0.00
Gemini 2.5 Pro1,048,5760$0.00
Gemini 3.5 Flash1,048,5760$0.00
Gemini 3.1 Pro Preview1,048,5760$0.00

Google prices:Source: ai.google.dev/gemini-api/docs/pricingVerified Single sourceHistory

Loading the OpenAI tokeniser…

What a token is

A token is the unit a language model actually reads and bills: a word, part of a word, a piece of punctuation, or a few bytes of a less common script. Anthropic's own glossary puts it plainly: tokens "can correspond to words, subwords, characters, or even bytes", and a model converts text into a sequence of them before it predicts anything (Anthropic glossary). Every price on this site is quoted per million tokens, not per word or per character, which is why a token count is the number that actually predicts a bill.

Why counts differ between models

Each vendor trains its own tokenizer on its own vocabulary, so the same sentence splits into a different number of pieces on each one. OpenAI publishes its tokenizer as open source: tiktoken's own model list maps every current GPT-4o, GPT-4.1 and GPT-5-family model to one encoding, called o200k_base (github.com/openai/tiktoken). Anthropic and Google do not publish their tokenizers, so this page estimates their counts from each vendor's own stated rule of thumb: roughly 3.5 characters per token for Claude, and roughly 4 characters per token for Gemini, with Claude's estimate adjusted for the newer tokenizer Anthropic says Claude Opus 4.7 and later models use, which produces about 30 percent more tokens for the same text than earlier Claude models (Anthropic token counting docs, Google Gemini token docs).

How to cut a token count

Remove instructions the model will not act on, collapse repeated context instead of resending it in full each turn, and prefer a short, direct brief over a long one padded with unused examples: the same advice this site's guide to writing AI prompts gives for its own reasons also shortens the bill. A document that must be sent in full costs what it costs; a prompt that repeats itself does not have to.

How the estimated cost is calculated

Token count multiplied by the model's published input price per million tokens, divided by one million. The prices come straight from this site's API pricing page, where each one is stamped with the vendor page it was read from and the date it was checked. This page never types a price by hand.

Questions people ask

Is the OpenAI token count exact?

For every model tiktoken lists, yes. It runs OpenAI's own open-source tiktoken library in your browser, using the o200k_base encoding tiktoken's own model list gives the GPT-5 family priced on this page, so those counts are exact. GPT-6 is not in tiktoken's list yet, so this page counts it with the GPT-5 encoder and labels the count an estimate, on its row and in the group heading, until OpenAI publishes GPT-6's own encoding.

Are the Claude and Gemini token counts exact too?

No, they are estimates, clearly labelled. Anthropic and Google do not publish a tokenizer that runs without a server: both offer a count-tokens API call that needs an account and a key, which this page cannot use without sending your text away from your browser. The estimate for Claude uses Anthropic's own published rule that a token is roughly 3.5 English characters, adjusted for the newer tokenizer Anthropic says Claude Opus 4.7 and later models use. The estimate for Gemini uses Google's own published rule that a token is roughly 4 English characters.

Why does the same text use a different number of tokens on different models?

Each vendor trains its own tokenizer on its own vocabulary, so the same sentence is split into pieces differently. OpenAI's GPT-5 family models all share one encoding, o200k_base. Anthropic says Claude's tokenizer changed with Claude Opus 4.7, producing roughly 30 percent more tokens for the same text than earlier Claude models. Counting in a script or code also behaves differently from counting in plain English prose, because punctuation and whitespace split into their own pieces.

How is the estimated cost calculated?

Token count multiplied by the model's published input price per million tokens, divided by one million. The prices come from this site's own API pricing page, where every figure carries the vendor page it was read from and the date it was checked.

Does this page send or store my text anywhere?

No. Counting happens in your browser. The page makes no request carrying your text, keeps no copy of it after you close the tab, and loads no analytics.