Token Counter & Cost Preview
Paste text for a fast planning estimate, then compare one call across the source-linked model catalog. Provider tokenizers may produce different counts.
Your text
Approximation only
Characters: 0
Words: 0
Lines: 0
Heuristic: CJK characters ≈ 0.7 token each; Latin prose ≈ 4 characters/token; symbol-dense code ≈ 3.3 characters/token. Verify production usage with your provider.
Estimated cost for one call
| Model | Input / output per 1M | Input estimate | Output estimate | Total / call | 1,000 calls |
|---|
How this estimate is produced
The counter runs entirely in your browser. It separates CJK characters from other text and adjusts the character-to-token heuristic when the input contains many symbols, as code often does. The displayed range adds a ±15% planning margin. No pasted text is sent to AI Agent Hub.
Useful for
Early prompt budgeting, comparing concise and verbose prompt versions, estimating retrieved context, and spotting unexpectedly large conversation histories.
Not a tokenizer
Every model family can split text differently. Special tokens, images, audio, tool definitions, and provider message formatting are not reproduced here.
Production check
Before purchasing capacity, compare this estimate with the token usage returned by the exact provider endpoint and model version you will deploy.
Why prompt size changes system cost
Longer input can increase both direct token charges and latency. In an agent, tool results and prior steps may be appended repeatedly, so the final request can be much larger than the user's message. Output length matters independently and is often billed at a different rate.
Privacy and accuracy notes
- The calculation happens locally; refreshing or clearing the field removes the text from this page.
- Do not paste secrets into any browser tool unless your own device and extensions are trusted.
- For chat workloads, include system instructions and retained conversation—not only the latest message.
- Use provider usage metadata as the billing source of truth.