About the LLM Token Counter
The LLM Token Counter runs entirely in your browser — your ideas and text never leave your machine. Fill in the fields, generate, copy the result.
Tokens are how LLMs count — roughly ¾ of an English word, and the unit every API bill and context window is measured in. A 120,000-word contract is ~160,000 tokens: over most models' context limits and several dollars per pass. This estimator gives you a fast answer (~words × 1 ÷ chars-per-token) plus the dollar cost of sending it.
How to use this tool
- Paste the full text you plan to send.
- Select the model — pricing per million tokens updates the cost rows.
- Adjust words-per-token if you paste code or non-English text (it tokenizes denser).
- Read tokens, context usage and estimated cost for one call.
Why exact counts differ
Tokenizers are model-specific: GPT-4 uses cl100k_base, newer models use o200k, Claude and Gemini have their own. Common English words merge into single tokens; rare words, emoji and other scripts split into several. This tool's estimate is within a few percent for English prose — good for budgeting, not for writing tests against an API limit.
Context math that matters
| Text size | ≈ Tokens | What fits |
|---|---|---|
| 1 page (500 words) | ≈ 650 | Trivial — fine anywhere |
| This guide (~800 words) | ≈ 1,100 | Fine even on free tiers |
| 300-page book | ≈ 120,000 | Needs a 200k context model |
| Codebase dump, 50 files | 300k–1M | Won't fit — summarize first |
Remember the output counts too: a long answer can double your bill, and reasoning models (o3, DeepSeek-R1) bill the hidden thinking tokens separately — often 10× the visible reply.
Who is this tool for?
Developers budgeting API costs before shipping a feature, power users hitting context limits, and teams estimating monthly LLM spend.
Prompt tip
For cost control, the biggest lever is not token price — it is prompt caching. Re-sending the same system prompt repeatedly? Cache it and cut input cost by up to 90% on supporting providers.