LLM Token Count Calculator
Language model APIs bill by the token, a chunk of text that averages about 4 characters in English. Paste a prompt and this calculator divides its character count by 4 to estimate the tokens, then multiplies by the selected model's published input price per 1M tokens. It lists nine models from OpenAI, Anthropic and Google and shows the date their prices were read. The count is an estimate, not a tokenizer result: code, JSON and text in other languages can take noticeably more tokens than it shows.
How to estimate tokens and input cost
- Pick a model in the Model list. Each entry shows its standard input price per 1M tokens.
- Paste or type the prompt into Your text. The numbers update as you type.
- Read Estimated Tokens, Characters and Words. Tokens are the character count divided by 4, rounded up.
- Read Estimated Cost (Input). The line under it shows the rate that was used, including the higher rate two models charge for long prompts.
- Change the Model to reprice the same text on another model.
What the estimate covers and what it leaves out
The count is the number of Unicode characters divided by 4, rounded up, and it is the same for every model. Four characters per token is the rule of thumb OpenAI gives for common English text. A real tokenizer splits text into subword pieces, so the true count depends on the model and on the content. Code, JSON and text in other languages can take noticeably more tokens than this estimate. When a prompt is close to a limit or a budget, get an exact count from the vendor's own tokenizer or token counting API.
The cost is the estimated tokens divided by 1,000,000, times the model's standard input price. Two listed models charge more for long prompts: GPT-5.4 doubles its input rate once a prompt is over 272,000 tokens, and Gemini 3.1 Pro doubles its rate over 200,000 tokens. The calculator applies the higher rate to the whole prompt. Output tokens, which cost four to six times as much as input tokens on the listed models, are not included, and neither are cached, batch or regional prices. The prices were read from the vendor pricing pages on the date shown under the result, so confirm them there before you budget.