🤖 LLM Token Counter and Cost Estimator
Estimate tokens and API cost for GPT, Claude, Gemini, and Llama before you send the request.
Last updated: November 8, 2026 · By the BoltQuickTools team
Per-model breakdown (2026 pricing)
| Model | Input tokens | Input cost | Output cost | Total |
|---|
Token counts are estimates based on character-to-token ratios per model family. Real counts differ by 5-10% from exact tokenizer output. Prices updated May 2026; refer to provider docs before billing decisions.
Sizing a prompt before you pay for it
If you are planning a batch job or comparing models, you need a rough cost before sending anything, and each provider counts tokens differently. This page gives a quick estimate from the length of your text. It does not run a real tokenizer, so use it for planning and not for billing.
Getting an estimate
- Paste your text into Paste your prompt or document. The results update as you type.
- Set Expected output tokens to the response length you expect. It starts at 500.
- Read the cards (Characters, Words, Lines, Detected) and the Per-model breakdown table, which lists input tokens, input cost, output cost and total for each model.
How the numbers are calculated
The page divides your character count by a fixed characters-per-token ratio for each model and rounds up:
| Models | Characters per token |
|---|---|
| GPT-5, GPT-4o, GPT-4o-mini | 4.0 |
| GPT-4 Turbo | 3.8 |
| Claude rows | 4.5 |
| Gemini rows | 4.3 |
| Llama row | 3.5 |
The Detected card then adjusts that ratio. code multiplies it by 0.78, which raises the token count. nonlatin replaces it with 1.5 for every model. prose leaves it alone.
Cost is estimated tokens times the input price, plus your expected output times the output price. Prices are per million tokens and hard-coded into the page, and a comment in its code dates them to May 2026.
Worked example: the text the page opens with
The starter prompt is 207 characters and is detected as prose. With 500 expected output tokens, some of the rows read:
| Model | Input tokens | Input cost | Output cost | Total |
|---|---|---|---|---|
| GPT-4o | 52 | $0.13 /1k | $5.00 /1k | $5.13 /1k |
| GPT-4 Turbo | 55 | $0.55 /1k | $0.0150 | $0.0155 |
| Claude Sonnet 4 | 46 | $0.14 /1k | $7.50 /1k | $7.64 /1k |
| Llama 4 405B | 60 | $0.16 /1k | $1.35 /1k | $1.51 /1k |
The /1k suffix is easy to misread. Any amount under one cent is displayed as the cost of 1,000 such requests. So $5.13 /1k means about half a cent for this one request, and $0.0155 is the actual cost of one request. Mixed rows like these are not on the same scale, so convert before comparing.
Where the estimate goes wrong
- No tokenizer runs here. Text with unusual words, long numbers or heavy punctuation can land well away from the true count. For a figure you can rely on, use the provider's own tokenizer or token-counting API.
- Only the text you paste is counted. Message formatting, tool definitions, images and files add tokens the page cannot see.
- Prompt caching and batch discounts are ignored, so a repeated system prompt can cost far less than shown.
- Prices can go out of date. They do not update on their own and the model list is fixed. Check the provider's price page before committing to a budget.
- Short-line prose can be flagged as code. Line breaks count heavily in the detection, so a short four-line poem reads as
codeand its count rises. - Mixed-script text is all or nothing.
nonlatinonly triggers when over 30% of the text is outside the extended Latin range, so Japanese with a lot of English in it is still treated as prose. - An empty box shows 1 token on every row, because the estimate has a minimum of 1.
The article on controlling LLM token costs covers ways to bring these numbers down. If you only need a plain word count, the word counter is simpler, and the JSON Schema tool helps when you are designing structured output.
Reading the results
Why do the models show different token counts for the same text?
Each row uses its own fixed ratio, as in the table above. The differences come from those ratios and are not the result of tokenizing your text with each model.
What should I enter for expected output tokens?
The most you expect the model to write. For a batch job, use the max_tokens limit you plan to set, which gives a worst case. Output is priced above input on most rows, so this field often decides the total.
Is my prompt sent to any of these providers?
No. The estimate is arithmetic on your text's length inside the page, and the script does not call any model provider.