AI & Developer Tools

AI Token Calculator

Paste any text to see roughly how many tokens it is — and what that text costs as input or output on every major AI model. Counts update as you type; nothing leaves your browser.

Tokens: 0

Cost of this text, model by model

ModelAs inputAs output×1,000 requests (input)

Prices are standard-tier list prices as of August 2026 — see the AI price tracker for current rates and recent changes.

How token counting works (and why this is an estimate)

AI models don't read words — they read tokens, chunks of roughly 3–4 characters of English. "Hamburger" is 2–3 tokens; "the" is 1. Each model family uses its own tokenizer, so exact counts differ slightly between GPT, Claude, and Gemini.

This tool uses the industry rule of thumb (≈4 characters or ≈0.75 words per token), which lands within about ±10% of real tokenizer output for normal English prose. For billing-critical exactness, use the provider's official tokenizer; for estimating costs and fitting text into context windows, this is what practitioners actually use.

Token rules of thumb worth memorizing

ContentApproximate tokens
One English word~1.3 tokens
One sentence~25–30 tokens
One page of text (500 words)~660 tokens
A 10-page document~6,600 tokens
A 300-page book~200,000 tokens
Coderuns 20–40% more tokens per "word" than prose
Non-English (Korean, Japanese…)often 1.5–3× more tokens per character

What a token actually looks like

"About 1.3 tokens per word" hides something worth seeing. Tokenisers split on statistical frequency, not meaning, so common words survive intact while unusual ones shatter:

TextWordsRoughlyWhy
The cat sat on the mat.67 tokensEvery word is common enough to be a single token; the full stop is its own.
Unbelievably, tokenization is counterintuitive.4~11 tokensLong, rare words break into three or four pieces each.
const x = arr.filter(n => n > 0);~14 tokensPunctuation, brackets and operators are usually separate tokens.
안녕하세요, 반갑습니다.2~12 tokensNon-Latin scripts are often split near character by character.

Two practical consequences. Whitespace and punctuation are billable — heavily formatted JSON or Markdown can cost 20–30% more than the same information as plain prose. And if you build for a non-English market, budget on the basis of your users' language, not English: the identical product can cost two or three times more per message in Korean, Japanese or Thai. Paste your real text above to see the actual count rather than the rule of thumb.

From token counts to a monthly bill

A token count only becomes useful when it meets a volume. The trap is that the two do not multiply the way people assume, because conversations resend their own history. Most APIs are stateless: turn eight of a chat carries turns one through seven along with it.

So a 500-token exchange in an eight-turn conversation does not cost 8 × 500 tokens. It costs closer to 12,000, because each turn re-sends everything before it. Teams that estimate from a single test message routinely under-budget by an order of magnitude. If you are sizing a product rather than a one-off job, see the real-task cost benchmarks, which price eight common workloads — including that chatbot — across every tracked model, or model your own traffic with the chatbot cost simulator.

This estimate is an English rule of thumb, and it is too low for other scripts

The count above comes from the industry heuristic — roughly four characters, or three quarters of a word, per token. For English prose that lands within about 10% of a real tokeniser, which is why practitioners use it. For text that is not written in the Latin alphabet, the assumption underneath it does not hold.

The reason is mechanical. Tokenisers are built from training text that is overwhelmingly English, so common English words survive as single tokens and four characters per token is a fair average. Korean, Japanese, Chinese, Thai, Arabic and Devanagari are split much more finely — frequently to about one token per character, sometimes more once the characters are encoded. Dividing those characters by four therefore produces a number that is lower than the truth, not merely different from it.

That direction matters. An estimate that is too high is annoying; an estimate that is too low is a budget that runs out. So when the text you paste is largely non-Latin, this page now says so under the result rather than quietly handing you a confident figure it cannot stand behind.

What to do instead: measure with the provider's own tokeniser before committing to a per-message price or a context-window design — OpenAI, Anthropic and Google all publish one. Use the figure here for what it is good at: comparing two pieces of English text, and getting a rough monthly cost inside the right order of magnitude.

Context windows shrink the same way

A context window is measured in tokens, not characters, so the same asymmetry applies to what fits. A limit quoted as "128,000 tokens — about 96,000 words" is quoting an English conversion. A document that fits comfortably in one language may not fit at all in another, and the failure shows up as a rejected request rather than as a warning. If you are designing around a context limit for non-English content, measure the real thing rather than converting from words.

Frequently asked questions

Why do tokens matter?

Two reasons: AI APIs bill per token, and every model has a context window (a maximum number of tokens per request). Knowing your token count tells you both what a call costs and whether your document fits.

Do GPT, Claude, and Gemini count tokens the same way?

No — each uses its own tokenizer, and the same text can differ by roughly 10–30% between them. The estimate here is a good planning midpoint.

Is my text uploaded to count it?

No. Counting happens entirely in your browser with simple arithmetic — nothing is sent to any server.

How do I reduce my token usage?

Trim conversation history, summarize long documents before sending, cache repeated system prompts (billed at ~10%), and route simple tasks to cheaper models — our chatbot cost simulator shows the impact at scale.

You might also need

Last reviewed: · Who maintains this · How it is checked

The arithmetic runs entirely in your browser — nothing you enter is sent to a server or stored. The formula and its assumptions are stated on the page so you can check the result rather than trust it.