Token Counter & Cost Calculator
Paste any text to estimate its token count and what it would cost to send to GPT, Claude or Gemini. Runs entirely in your browser — nothing is sent to any AI provider.
| Model | Input | Output | Total |
|---|
Token counts are a close estimate; exact counts depend on each model’s tokenizer. Prices shown are example price points per 1 million tokens, not official rates; check your provider’s pricing page for current rates before budgeting.
How the token counter works
Large language models split text into tokens — pieces that are usually a word, part of a word, or a punctuation mark. In English, one token is roughly four characters or three-quarters of a word. Code, URLs and non-Latin scripts use more tokens per character.
This tool applies those rules locally to estimate a count, then multiplies by example price points per 1 million tokens. Nothing you paste is sent anywhere; the calculation is plain JavaScript in your browser.
Why the estimate is not exact
Each model family uses its own tokenizer, and the exact split depends on the vocabulary the model was trained with. For budgeting and comparing models the estimate is close enough; for exact billing, the API response from the vendor is the only authoritative number.
Frequently asked questions
Is my text sent to OpenAI or Anthropic? No. The whole calculation happens in your browser.
Why does code count more tokens than prose? Symbols, indentation and unusual identifiers split into more pieces than common English words.
Are cached-input or batch discounts included? No. The table uses example standard (non-discounted) prices per 1 million tokens. Many vendors offer 50–90% discounts for cached prompts and batch jobs.
What does a token counter do?

A token counter tells you how many tokens a piece of text will use when you send it to a large language model such as GPT, Claude or Gemini. Tokens are the unit these models read, write and bill by, so the count decides whether your prompt fits in the model’s context window and roughly what it will cost.
A token is not the same as a word. Common short words like “the” or “and” are usually a single token, while a long or rare word such as “unbelievably” may be split into two or three pieces. Spaces, punctuation and line breaks are often folded into neighbouring tokens. That is why a quick rule of thumb works well for English: about 4 characters, or about 0.75 words, per token. Put the other way round, 100 English words come to roughly 130 to 135 tokens.
Worked example: estimating the cost of a prompt
Every provider bills the same way: cost = tokens × price per million tokens ÷ 1,000,000, calculated separately for input (what you send) and output (what the model writes back). Output tokens are usually priced higher than input tokens. The prices below are round example numbers, and the table above also uses example price points per 1 million tokens; check your provider’s pricing page for current rates.
- You paste a 1,200-word article and ask for a summary. Using 0.75 words per token, the input is about 1,200 ÷ 0.75 = 1,600 tokens.
- You expect a summary of about 500 output tokens.
- Assume an example price of $3 per million input tokens: 1,600 × 3 ÷ 1,000,000 = $0.0048.
- Assume $15 per million output tokens: 500 × 15 ÷ 1,000,000 = $0.0075.
- Total per call: $0.0048 + $0.0075 = $0.0123. Run the same job 1,000 times and it costs about $12.30.
The tool above does exactly this arithmetic for you: set the expected output tokens and the number of calls, and it multiplies through for each example model tier.
Quick words-to-tokens reference (English, approximate)
| Text length | Approx. tokens | Typical example |
|---|---|---|
| 75 words | about 100 | A short email |
| 500 words | about 670 | One single-spaced page |
| 1,000 words | about 1,330 | A standard blog post |
| 3,000 words | about 4,000 | A long report section |
| 10,000 words | about 13,300 | Several e-book chapters |
These figures assume plain English prose. Code, tables, URLs, numbers and languages such as Hindi, Chinese or Arabic usually produce more tokens for the same length of text.
Tips for keeping token counts down
- Trim what you paste. Headers, footers, navigation text and repeated disclaimers all cost tokens without helping the answer.
- Ask for a length limit. “Answer in under 150 words” caps output tokens, which are usually the expensive side.
- Remember the conversation history. In a chat, earlier messages are usually re-sent with each new turn, so a long thread gets more expensive with every reply.
- Minify data before sending. Pretty-printed JSON with deep indentation uses noticeably more tokens than the same data on fewer lines.
- Leave headroom in the context window. The window has to hold your input and the model’s reply together, so do not fill it with input alone.
More questions
How many tokens is 1,000 words?
For typical English text, about 1,300 to 1,400 tokens. Technical writing with lots of numbers, code or unusual names will be higher.
Why does the same text give different counts in GPT, Claude and Gemini?
Each model family has its own tokenizer with its own vocabulary of word pieces. One tokenizer may store a word as a single piece while another splits it in two, so the same paragraph can differ by several percent between models.
What is a context window?
It is the maximum number of tokens a model can consider at once, counting your prompt, any files or history you include, and the reply. If the total goes over the limit, the request fails or older content gets cut off.
Do spaces and punctuation count as tokens?
Yes, they are part of the text the tokenizer processes. A space is usually merged into the word that follows it, while punctuation marks and line breaks often become separate tokens, which is why heavily formatted text counts higher.
Related tools: check plain word and character counts with the word counter, strip markdown symbols from a response before reusing it with the AI text cleaner, or start from a tested template in the prompt library.
Further reading: Byte pair encoding (Wikipedia).