LLM Token Counter

Estimate how many tokens your prompt costs — and why the same text costs three times more in Japanese than in English.

Estimated cost

Cost of one call $0.00
Cost of all calls $0.00

The tiers are typical orders of magnitude, not a provider's price list — model prices change faster than any page can track. Put your own numbers in the two fields and the estimate becomes yours.

Why the same paragraph costs three times more in Japanese

Language models do not read characters or words. They read tokens: fragments produced by a byte-pair encoding that was trained by merging the most frequent sequences in a corpus. Common English words end up as one token each. Everything else gets chopped into pieces — and you pay per piece, in both directions.

The rule of thumb, and where it breaks

The figure everyone quotes is one token ≈ 4 characters of English, or about 0.75 words. It holds well for ordinary English prose. It does not hold anywhere else, and the size of the gap is the thing worth knowing before you sign an API budget:

  • English prose — about 4 characters per token.
  • Cyrillic and Greek — about 2. The alphabet is well covered but the words are not, so they split into two or three pieces each.
  • Chinese — about 1.4 characters per token. Common characters and pairs are in the vocabulary; rarer ones are not.
  • Japanese — a little over 1. Kana sequences fragment, and mixed kanji-kana morphology gives the tokenizer little to merge.
  • Thai and the Indic scripts — around 1, sometimes below it. Written without spaces and with heavy use of combining marks, they are the worst covered of all.

Worked example. Take a 500-character paragraph. In English that is roughly 125 tokens. The same paragraph translated into Japanese runs about 400 characters, and at 1.1 characters per token that is around 360 tokens — nearly three times the cost for the same meaning. Translate your prompt into Japanese and your bill triples; nothing in the pricing page mentions it.

What this costs at scale

At a frontier-model price of $5 per million input tokens, a 1,000-token prompt costs half a cent. Run it 100,000 times a month and it is $500 — and if that prompt is in Japanese, $1,500. The cost of a prompt is a design decision, not a line item:

  • Trim the system prompt first. It ships with every single call, unlike the user's message.
  • Watch formatting, not just words. JSON with pretty-printed indentation, markdown tables and long unbroken URLs are token-expensive for the information they carry. Repeated whitespace is billed.
  • Output is the expensive half. Output tokens usually cost three to four times input tokens. Asking for a shorter answer is often a bigger saving than shortening the question.

Why this page estimates instead of tokenizing

A real tokenizer needs its vocabulary — 100,000 to 200,000 entries, several megabytes. Loading that to count a prompt would make this page heavier than every other tool on the site combined, and it would still be wrong the moment a provider ships a new vocabulary.

So this counter estimates from the writing system: Latin words follow the word-shaped rule that byte-pair encodings actually produce, and scripts without word spaces are counted per character with a published factor. On prose it lands close; on minified code, base64 blobs or dense punctuation it drifts wider, which is why the result is shown as a range and labelled an estimate. If you need the exact number, your provider's tokenizer endpoint is the only source that is exact — and it changes with the model.

FAQ - Frequently Asked Questions

How accurate is this estimate?
On ordinary prose it is usually within about 15% of what a byte-pair tokenizer reports. On source code, minified JSON, base64 strings and text with heavy punctuation it can be further off, because those are exactly the inputs where the real vocabulary's merges are unpredictable. Use it for budgeting and for comparing two drafts of a prompt, not for enforcing a hard context limit.
Why does the same text give different token counts on different tools?
Because each model family ships its own vocabulary. The tokenizer behind GPT-4-class models is not the one behind GPT-3.5, and neither matches Claude's or Gemini's. Differences of 10-20% between providers on the same text are normal, and larger on non-English text. There is no single true token count for a string — only a count per tokenizer.
Do spaces and line breaks count as tokens?
A single space usually costs nothing extra: byte-pair encodings attach the leading space to the following word, which is why token and token are different entries. Runs of spaces, tabs and blank lines are different — they become tokens of their own. Indented JSON can spend a noticeable share of its tokens on nothing but whitespace.
Does the input count include the system prompt and the conversation history?
Not here — this page counts the text you paste. In a real API call you also pay for the system prompt, every previous turn you resend, tool definitions and any documents in the context window. In a long chat, history is often the largest part of the bill, and it is charged again on every turn.
Which prices should I put in the fields?
Your own. The three tiers here are typical orders of magnitude for a frontier, mid-size and small model, not any provider's list — prices change several times a year and a page that pretends otherwise is misleading by the month. Take the current numbers from your provider's pricing page and type them in; the arithmetic is the part that does not change.
Is my prompt sent anywhere?
No. The estimate is computed in your browser, and prompts are exactly the kind of text that should not be pasted into a random web form: they routinely contain customer data, unreleased product details and internal instructions. Nothing here is uploaded, stored or logged.