Free tool
Token counter and prompt cost estimator
Paste a prompt to estimate its tokens, cost and context-window use. A rough count that runs in your browser.
These are estimates from a simple rule, not a real tokenizer. Counts differ by model and language. No prices are filled in; enter the current ones from your provider.
How many tokens is my prompt?
AI models read text in small chunks called tokens. A token can be a whole short word, part of a longer word, a number or a punctuation mark. This tool estimates the count with the larger of two numbers: characters divided by 4, and words times 1.33. It is a planning aid. The count your provider reports will differ.
Why about four characters per token?
Common English words are often one token, and longer or rarer words split into two or three. Averaged over ordinary prose, that comes to roughly four characters a token, or about three quarters of a word. Code, URLs, tables and numbers use more tokens for the same length because they contain many symbols and unusual strings. Languages that are less common in a model’s training data, and scripts such as Chinese, Japanese, Korean or Arabic, often need more tokens than English for the same meaning. Emoji can cost several tokens each.
How the cost estimate works
Providers usually charge separately for input tokens (what you send) and output tokens (what the model writes), priced per million. The tool multiplies each count by the price you type and adds them. It shows nothing until you enter a price, because prices change and we do not want to show a stale one.
The context window check
A context window is the most tokens a model can handle in one conversation, counting your input, earlier messages and its reply. Enter the limit from the model’s documentation to see how much of it your text uses. Leave room for the answer.
Ways to cut prompt cost
- Remove text the model does not need, such as repeated instructions and old messages.
- Send only the relevant part of a long document.
- Ask for a short format, and set a limit on the answer length.
- Test a small sample before you run a large batch.
A clear brief usually shortens a prompt as well: see write a brief before you write a prompt, what an AI agent does and how to cite ChatGPT. Other tools: reading time calculator, campaign link builder and search snippet preview.
Your text stays in this tab. Refreshing the page clears it.
Explore the other free tools ↗