A support agent answers the same question for a customer in Manchester, one in Munich and one in Osaka. Same prompt, same model, same price list. The three requests are billed differently, and the one in Osaka costs the most for the fewest characters. Nothing in the character count predicted it, because the bill is not in characters.

Thesis: Characters are a rough proxy for tokens that fails where it matters: the same text counts differently by model and by language, so a budget, a price or a cut-off holds only for the tokenizer that counted it, and a model change can change the bill for an unchanged prompt even at the same price per token.

TLDRFour steps, about thirty seconds
the billManchesterMunichOsakaTokens, SentencePieceEnglish32German45Japanese79tokensEnglish proseabout 2,000Japanese6,200 to 7,300The price listthe context windowthe rate limitsmax_tokensyour own codeall in tokenscharactersthe billManchesterMunichOsakaTokens, SentencePieceEnglish32German45Japanese79tokensEnglish proseabout 2,000Japanese6,200 to 7,300The price listthe context windowthe rate limitsmax_tokensyour own codeall in tokenscharacters

Step 1 of 4

Tokens Are the Unit of Account

A support agent answers the same question in Manchester, Munich and Osaka.

Same prompt, model and price list, yet Osaka pays the most for the fewest characters, because the bill is not counted in characters.

Read the TLDR as text
  1. Tokens Are the Unit of Account. A support agent answers the same question in Manchester, Munich and Osaka. Same prompt, model and price list, yet Osaka pays the most for the fewest characters, because the bill is not counted in characters.
  2. The Same Text, Counted Twice. Article 1 of the UN Declaration costs 32, 45 and 79 tokens on a SentencePiece tokenizer, not a chat model's: Japanese 2.5 times English.
  3. The Agent That Served Three Countries. Trimming at 8,000 characters keeps about 2,000 English tokens but 6,200 to 7,300 Japanese ones on the author's ratios: one budget, unequal limits.
  4. Three Prices for One Unit. Prices, the window, rate limits and max_tokens are all counted in tokens; only your own code counts characters.

Where Retrieval Enters the Turn finished assembling the call. This chapter is the second stage of One Request, End to End's map, where the provider cuts the call's text into tokens.

What a Token Is

A model does not read characters. At the API boundary the provider's tokenizer turns your text into a sequence of integers, each an entry in a fixed vocabulary, and that sequence is what the model reads, what the context window measures and what the bill counts. OpenAI's open-source tokenizer library tiktoken (README, read 2026-11-06) says it in one line: "Language models don't see text like you and I, instead they see a sequence of numbers (known as tokens)."

The vocabulary is fixed before the model is trained, most often by byte pair encoding, brought to this use by Sennrich, Haddow and Birch in Neural Machine Translation of Rare Words with Subword Units (2015; ACL 2016), which encodes "rare and unknown words as sequences of subword units". Sennrich started from single characters; today's byte-level tokenizers start from single bytes, the 256 values of eight bits that encode text, one per character for plain English and two to four for most other scripts in the usual UTF-8 encoding.

The tokenizer's own training is short. Count every adjacent pair in a large body of text. Merge the most frequent pair into one new entry. Repeat until the vocabulary is the size you chose. The merge list is the tokenizer: at inference the same merges apply in the same order, so words the text made common become one token, rare ones several, and anything it never favoured falls back to bytes. tiktoken's README gives the consequence: on average "each token corresponds to about 4 bytes."

Four merges over a toy corpus show the whole mechanism. Toy counts on Sennrich's words; no model's vocabulary.

Merge Corpus: low ×5, lower ×2, newest ×6, widest ×3 Pair seen Vocabulary gains
1 e s sits inside newest and widest 9 times es
2 es t closes both 9 times est
3 l o opens low and lower 7 times lo
4 lo w 7 times low

After four merges the word lowest, which the corpus never held, encodes as low est, the merges applied in the order they were learned:

flowchart LR
  A[l o w e s t<br/>six bytes, six tokens] -->|merge 1: e s| B[l o w es t]
  B -->|merge 2: es t| C[l o w est]
  C -->|merge 3: l o| D[lo w est]
  D -->|merge 4: lo w| E[low est<br/>two tokens]
  E --> F[two token ids<br/>what the model reads<br/>and the bill counts]
  style E fill:#5a5a8a

Figure: Four byte pair merges turn the six bytes of "lowest" into two tokens, low and est, and those two ids are what the model reads and the bill counts.

A real vocabulary runs to six figures of entries. The lab below runs the same procedure at toy scale: it learns its merges from a short English text about service desks, then splits whatever you type. It is illustrative, no model's tokenizer, but it shows the two effects the rest of this chapter measures: text the merges favoured comes out in few tokens, and everything else, including other languages, falls back towards single bytes. Slide the merge count down and the same text costs more tokens, which is what a smaller or different vocabulary does to your count. With JavaScript off, the table shows its counts for the examples.

Example (toy tokenizer, 165 merges) Tokens, all merges Tokens, no merges Characters UTF-8 bytes
English question 17 49 49 49
The same, German 39 55 54 55
The same, Japanese 86 86 30 86
A tool call, JSON 30 36 36 36
Three words it never saw 24 36 36 36

The English example is the question from Anatomy of a Turn, "Which of last week's P1 incidents are still open?". With all merges it splits into W h ic h, then of last week ' s P 1 incident s are still open ?, each word carrying its leading space. Which breaks apart because it opens the text with no space before it: the training text has Wh after a space four times and without one only once, too rare to earn a merge. The Japanese gets no merges at all: every byte is a token.

The Same Text, Counted Twice

The "about" in "about 4 bytes" is where budgets go wrong, so I counted the same texts with two real tokenizers, the two already in this site's build. On a million characters of English prose, characters ÷ 4 was within 2% of the real count: the rule of thumb earns its reputation there. It loses it at the edges. It undercounted code by 17 to 18% and minified JSON by about 40%. And one meaning in three languages cost 32, 45 and 79 tokens: German 1.4 times the English, Japanese 2.5 times it with half the characters. Four of the seven samples missed by more than 25% on at least one of the two tokenizers.

For builders: the full count, with method

Both tokenizers are subword tokenizers, though not byte pair encoding: WordPiece, from the model that powers this site's search (30,522 entries, lower-cased), and SentencePiece, from its small classifier (128,000 entries, cased). Neither is a chat model's tokenizer, so a chat model's ratios will differ. Characters are Unicode code points; the last column is what characters ÷ 4 would have told you against the real count.

Text Characters Tokens, WordPiece Tokens, SentencePiece Characters per token Characters ÷ 4, error
93 posts, prose 982,606 251,646 243,959 3.9 to 4.0 −2% to +1%
the same posts, code blocks 243,636 74,734 73,004 3.3 −18% to −17%
three tool definitions, indented JSON 2,522 635 624 4.0 −1% to +1%
the same definitions, minified 1,498 635 624 2.4 −41% to −40%
Universal Declaration of Human Rights, Article 1, English 170 32 32 5.3 +33%
the same article, German 164 57 45 2.9 to 3.6 −28% to −9%
the same article, Japanese 84 63 79 1.1 to 1.3 −67% to −73%

Counted 2026-11-06, offline, with Xenova/all-MiniLM-L6-v2 (WordPiece) and Xenova/nli-deberta-v3-xsmall (SentencePiece Unigram). The posts are this site's real corpus; the tool definitions are illustrative; the Declaration's texts are the UN's English and the German and Japanese translations on Wikisource.

The same three definitions cost identical tokens indented and minified because both tokenizers drop whitespace before counting; a chat model's byte-level tokenizer never discards a byte, so there the two would differ. The language figures are on the larger vocabulary. Had ÷ 4 landed within 25% on every sample, the thesis would have been wrong for these tokenizers.

Why Counts Differ by Language and by Model

Language first. The merges were learned from text, and a vocabulary learned mostly from English spends its entries on English and spells out the rest. Petrov and colleagues measured it in Language Model Tokenizers Introduce Unfairness Between Languages (NeurIPS 2023): the same text translated can differ in tokenization length "up to 15 times in some cases", and cost, latency and how much fits in the window follow.

Model second. Each model family has its own vocabulary, so a new model can count the same text differently. The vendors say so outright: Anthropic's glossary (read 2026-11-06) says its newer tokenizer, from Claude 4.7 on, produces about 30% more tokens for the same text than earlier models, and its token-counting page warns against reusing counts from the older model. Cross that line and an unchanged prompt has a new count.

Three Prices for One Unit

Tokens in and tokens out are priced apart, and output is the dear one. Anthropic's pricing page (read 2026-11-08) lists Claude Sonnet 5.5 at $2 per million input tokens and $10 per million output; OpenAI's pricing page (read 2026-11-08) lists gpt-6.1-sol at $2.00 and $10.00, with output at four to eight times input on its older models. There is a third price, lower than both, for input the provider has already seen; How the Model Reads the Window shows why output is the slow half, and What a Prompt Cache Reuses what a cached prefix is. The accounting consequence belongs here: most of an agent's input is re-sent (Anatomy of a Turn), but at these prices every token of a reply costs five times as much as a token of input, and a reasoning model's hidden thinking is billed as output too (From Logits to Response). The price list, the context window, the rate limits and max_tokens are all in tokens. The only thing in your stack measured in characters is your own code.

Count Before You Send

There are three counts, and only one is the bill. A vendor counting call is the estimate: most providers offer an endpoint that counts a call's tokens for the model you name before you send it (Anthropic's, for one). An open tokenizer library is the offline estimate where the vendor publishes one, as OpenAI has for its earlier models. The usage block in the response is what you were charged. Log it on every call, beside the model id that produced it.

The Agent That Served Three Countries

A bank's card-dispute agent runs on a 20,000-token system prompt and answers customers in English, German and Japanese from one prompt.

The bill. The shared system prompt counts the same in every market, but on my ratios the customer's messages cost about 1.4 times as much in German and 2.5 times in Japanese, and the reply, written in the customer's language, carries the same multiple at five times the rate. The forecast was built on English pilots.

The cut-off. The harness trims the transcript at 8,000 characters: about 2,000 tokens in English prose and 6,200 to 7,300 in Japanese on my ratios. A chat model's tokenizer gives other multiples, not another shape. A budget in characters is a different budget per language, loosest where tokens run highest.

The migration. The team moves to a newer model at the same list price, and the vendor documents a tokenizer change of about 30%. Every prompt grew by roughly that much on the invoice with no edit, and the per-conversation cap, set against the old counts, trips earlier.

When Characters Are Good Enough

For order-of-magnitude budgeting of English prose, ÷ 4 is fine; Your Tool Schemas Are the Bloat prices from exactly that proxy and says so. A counting call is also a round trip a chat UI does not want before every message, and for a single-language, single-model product the proxy's error is a constant you can calibrate once. That last clause is where it loses: change the language, the kind of text or the model, and the constant is gone.


What to Do Next

  • Budget in tokens, with the model id beside the number. Recount at every migration, and treat a documented tokenizer change as a price change.
  • Log usage on every call. It is the bill and part of the audit record; reconcile estimates against it and alert when the ratio drifts.
  • Measure your language mix. Run real transcripts per language through the vendor's counting call and expect multiples, not percentages.
  • Stop setting cut-offs in characters. A transcript trim, a field limit or a retrieval cap in characters is a different token budget per language and per model.

Next in the series: How the Model Reads the Window, on what the model does with these tokens in one pass. Related reading: One Request, End to End for the token shares of the 238-tool call.