Key facts
| Tool type | Free token counter with context-window checks |
| Inputs | Pasted text, file sample or prompt template |
| Outputs | Input tokens, output estimate, total versus context limit |
| Coverage | Tokenizers for the models in the live catalogue |
| Companion tools | LLM cost calculator and context-window comparison |
| Models | 30+ models from free to frontier tiers |
| Free plan | 2 free AI models (plugsky-micro, plugsky-lite), no card required |
| Product status | Live |
TL;DR
- Words are a bad proxy for tokens: code, JSON and non-Latin scripts inflate counts.
- Measure the worst-case input, not the average, so truncation never ships.
- Reserve part of the context window for output and tool schemas.
- Re-count after every prompt change; trimming a system prompt often pays for itself.
- Feed the same numbers into the cost calculator to see the budget impact.
How it works, step by step
- Collect three real inputs per workload: a typical one, a long one and an awkward one.
- Open the AI token calculator and paste the longest input for each workload.
- Select the tokenizer that matches your target model from the catalogue.
- Record input tokens and compare them with the model's context window.
- Add your estimated output length plus any tool schemas, then check the total still fits.
- Trim or chunk the input where the total exceeds roughly 70-80 percent of the window.
- Set max_tokens from the measured output estimate and monitor real usage after launch in production.
Try it yourself
Why token estimates beat guessing
Rules of thumb break down exactly where budgets are tightest. English prose averages roughly four characters per token, but code, JSON, tables and non-Latin scripts such as Arabic or Chinese tokenize far less efficiently. A prompt that looks short in a text editor can consume twice the tokens you planned. Measuring real samples catches this before it becomes a truncation bug or a surprise on the usage dashboard, and it takes less time than debugging either.
Sizing the context window correctly
The context window is shared by everything in the request: system prompt, conversation history, retrieved documents, tool definitions and the model's own output. Teams commonly count only the user message and then wonder why answers get cut off. Reserve explicit room for output — a summariser that must return 500 tokens needs those 500 tokens inside the window. When the total approaches the limit, reduce retrieved chunks, summarise older turns, or move to a model with a larger context rather than silently truncating. A useful habit is to re-measure the fully assembled request, not the template alone.
From token counts to budgets
Token counts are the input to every cost and latency decision. Multiply input and output tokens by your expected request volume to size the workload, then run the same numbers through the LLM cost calculator. If per-token estimates grow with every agent step, compare that curve with flat monthly self-serve plans on the live pricing page. Output tokens usually cost more than input tokens, so capping verbose answers is often the cheapest optimisation available, and the estimate is quick to re-run.
Honest comparison
| Approach | Accuracy | Effort | Best use |
|---|---|---|---|
| Word counting | Low, especially for code and non-Latin text | None | Rough content planning only |
| Character heuristics | Medium for English prose | Low | Early estimates |
| Token calculator | High, uses the model tokenizer | Minutes | Prompt and context budgeting |
| Live telemetry | Highest, real usage per request | Instrumentation | Post-launch monitoring and alerts |
Frequently asked questions
Are tokens the same as words?
No. One token is often a word fragment, and the ratio varies by language and content type. Code, JSON and non-Latin scripts need more tokens per word than English prose.
Why does the context window fill up so fast?
Every part of the request shares the window: system prompt, history, retrieved context, tool schemas and the model's output. Count all of them, not just the user message.
Does the calculator need my API key?
No. It counts tokens locally from the text you paste, so no credentials or network calls are required.
How much of the context window should I leave free?
Leave enough for the full expected output plus headroom. Treating roughly 70-80 percent usage as a warning line avoids truncation and keeps quality stable.
Do different models count tokens differently?
Yes. Tokenizers differ between model families, so choose the tokenizer that matches your target model before trusting the number.
Can I calculate cost as well as tokens?
Yes. Take the counts into the LLM cost calculator to estimate spend, then compare with flat monthly plans on the live pricing page.
How often should I re-measure?
Whenever prompts, templates, retrieval settings or models change. A single added instruction can shift token counts meaningfully at scale.
Is there a free way to start?
Yes. The free plan includes 2 free AI models (plugsky-micro and plugsky-lite) with no card required.