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
Likely 30–40, depending on tokenizer (sample prompt)
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 |
|---|---|---|---|---|---|
| DeepSeek V4.1 Flash DeepSeek | $0.15 / $0.60 | <$0.0001 | $0.0006 | $0.0006 lowest | $0.61 |
| GPT-5.6 Luna OpenAI | $0.20 / $1.20 | <$0.0001 | $0.0012 | $0.0012 | $1.21 |
| DeepSeek V4 Pro DeepSeek | $0.66 / $1.98 | <$0.0001 | $0.0020 | $0.0020 | $2.00 |
| Gemini 3.8 Flash Google DeepMind | $0.75 / $3.75 | <$0.0001 | $0.0037 | $0.0038 | $3.78 |
| Claude Haiku 4.5 Anthropic | $1.00 / $5.00 | <$0.0001 | $0.0050 | $0.0050 | $5.04 |
| Claude Sonnet 5 Anthropic | $2.00 / $10.00 | <$0.0001 | $0.01 | $0.01 | $10.07 |
| GPT-5.6 Terra OpenAI | $2.00 / $12.00 | <$0.0001 | $0.01 | $0.01 | $12.07 |
| Gemini 3.1 Pro Google DeepMind | $2.00 / $12.00 | <$0.0001 | $0.01 | $0.01 | $12.07 |
| GPT-5.6 Sol OpenAI | $4.00 / $20.00 | $0.0001 | $0.02 | $0.02 | $20.14 |
| Claude Opus 5 Anthropic | $5.00 / $25.00 | $0.0002 | $0.03 | $0.03 | $25.18 |
| Claude Fable 5.1 Anthropic | $10.00 / $50.00 | $0.0003 | $0.05 | $0.05 | $50.35 |
| GPT-6 Astra OpenAI | $10.00 / $50.00 | $0.0003 | $0.05 | $0.05 | $50.35 |
Worked Case Study: Why Mixed Code & CJK Prompts Shift Token Bills
Teams frequently assume "1 token equals 4 characters" universally, then get surprised when production bills run 25%–40% higher. In practice, modern BPE tokenizers behave very differently depending on symbol density and non-Latin scripts. For example, pasting a 1,200-line TypeScript handler containing structured JSON schemas and Chinese inline comments yields noticeably different token counts across providers:
Before locking in a monthly forecast, paste an actual production trace—including system prompt, tool JSON schemas, and retrieved RAG chunks—rather than estimating solely from user messages.
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.