Comment utiliser cette calculatrice
What a token is, and why the count is an estimate
A token is the unit a language model reads and writes: roughly a word, a sub-word, or a punctuation mark, depending on the model’s vocabulary. Models are billed per token, and their context windows are measured in tokens, which is why the number matters before you send a prompt. The tool estimates the count with the vendors’ own documented heuristic — about one token per four characters of English text — rather than each model’s exact tokenizer, whose BPE vocabulary is far too large to ship in a static page.
The estimate is calibrated for English prose. Non-English text, dense punctuation, code with long identifiers, and tables all tokenize differently, and the page says so plainly: for billing-critical counts the vendor tokenizer is authoritative, and this tool is for planning — sanity-checking spend before a batch job, comparing model families, or finding out why a prompt overflowed its context window.
Estimating cost before you commit
Cost is two numbers, not one: input tokens and output tokens, and they are billed at different rates — output almost always costs more per token. The tool asks for an expected output length when you want the full picture, estimates output tokens at roughly 0.75 words per token, and combines both sides at the model’s public list prices.
The prices are shown with the date they were recorded (2026-08-05) because model pricing changes — a rate update at the vendor is never silently baked into an estimate. When you are planning a real workload, confirm the current rates on the vendor’s pricing page; the tool’s job is the arithmetic, not the price forecast.
Choosing a model family for the job
The counter lets you compare models side by side: the same prompt can be 250 tokens on one family and 220 on another, and the input cost per million tokens differs enough that the comparison changes real decisions about batch size and routing. Run the same prompt across the families you are considering and read the combined cost — that is the number that belongs in a budget review, not the token count alone.
The context-window check is the other side of the comparison: a prompt that fits comfortably in one family’s window may not fit a smaller-window model at all, and the tool flags that before you discover it in an API error.
The local promise
Prompts you paste here often contain proprietary code, unpublished plans, or personal data — exactly the text you should not send to a third-party tokenizer. Everything runs in your browser: the estimate is computed locally, nothing is uploaded, logged, or stored, and there is no server that could see the text. The trade is the one disclosed above: the count is the documented heuristic rather than the exact vocabulary, which is the honest price of keeping the prompt on your device.
Questions fréquentes
Pourquoi le compte est-il une estimation plutôt qu'un nombre exact ?
Les comptes exacts de jetons viennent du tokeniseur de chaque modèle, un vocabulaire BPE embarqué dans les bibliothèques du fournisseur — trop volumineux pour une page statique. L'heuristique documentée d'environ 4 caractères par jeton est précise à quelques pour cent près pour les prompts anglais typiques, ce qui suffit pour planifier coûts et contexte.
Le compte correspond-il aux pages tokeniseur d'OpenAI ou d'Anthropic ?
Proche, mais pas identique. Les tokeniseurs officiels utilisent le vrai vocabulaire et sont exacts ; cet outil utilise l'heuristique documentée pour pouvoir fonctionner entièrement dans votre navigateur. Pour des comptes décisifs pour la facturation, utilisez le tokeniseur du fournisseur — l'estimation ici sert à la planification.
Pourquoi les prix sont-ils datés ?
Les tarifs des modèles changent. L'outil enregistre les tarifs publics listés sur lesquels il a été construit (2026-08-05) et affiche cette date avec chaque résultat, pour qu'un changement ultérieur de tarif chez le fournisseur ne soit jamais intégré en silence dans une estimation.
Does the tool count output tokens for me?
Only when you provide an expected output length. Output tokens are estimated at roughly 0.75 words per token and combined with input cost at the model’s output rate. Without a length, the tool reports input cost alone.
Why is my code tokenized so differently from my prose?
Tokenizer vocabularies are trained on the language they see most: prose-heavy text tokenizes near the four-characters-per-token average, while code and non-English text drift from it. That is the main reason the estimate is an approximation rather than an exact count.