Learn · 2 of 7
Tokens, and why everything is counted in them
The unit everything is counted and charged in, and why it is not words.
A model does not see letters, and it does not see words. It sees tokens: fragments of text that were carved out of the language before training began, and frozen.
For ordinary English, one token is about four characters — so a thousand tokens is roughly 750 words, or a page and a half. That ratio is a rule of thumb, not a rule.
Why it varies so much
Code tokenises less efficiently than prose, because punctuation and indentation each cost something. A rare word splits into several tokens where a common one is a single token. Languages that do not use spaces, and languages written in scripts the tokenizer (The fixed table that chops text into tokens. Decided before training and never changed afterwards.) saw little of, can cost two or three times more tokens to say the same thing.
That last one has a consequence people rarely notice: the same question costs more to ask in some languages than in others.
Why you cannot just count characters
Every vendor’s model has its own table. The same sentence can be 18 tokens to one model and 23 to another, and there is no conversion between them.
The estimator below is honest about this: it divides by about four and says so. For planning, that is fine. For a bill, the only authority is the vendor’s own count.
Both directions, different prices
You are charged for tokens going in and tokens coming out, almost always at different rates — and output usually costs three to five times more than input.
So a long answer costs more than a long question, which is the opposite of most people’s intuition, and it is why asking for brevity saves real money. The arithmetic is on the model table and in the calculator.
This is approximate and cannot be otherwise. Every model carves text up with its own fixed table, so the same sentence is a different number of tokens to each one. This uses about four characters per token, which is a decent rule of thumb for ordinary English prose and a poor one for code, for rare words, and for languages the tokenizer saw little of. For a bill, the only authority is the vendor's own count.