What Is a Token in AI? How to Count Tokens and What They Cost

What an AI token is, how many words fit in 1,000 tokens, how to count tokens for OpenAI, Claude and Gemini, and how token counts turn into cost.
Short answer: A token is a chunk of text that an AI model reads and bills by: often a whole short word, sometimes part of a word, a space or a punctuation mark. Models measure prompts, limits and prices in tokens, not words. The count depends on the model, because each provider splits text with its own tokenizer.
I check token counts every time I change the system prompt for ChatX, our own chat agent, because that prompt goes out with every message. For a long time that meant one provider's counter at a time, then working out the price myself. I wanted the count and the cost on one page, which is why we built the free Token Counter. It runs a real tokenizer and shows what a prompt costs on each model, with no sign-up.
What is a token in AI?
A token is the unit an AI model breaks text into before it processes it. Google's Gemini documentation puts it simply: tokens can be single characters or whole words, and long words are split into several tokens.
Splitting text this way is called tokenization, and the full set of tokens a model knows is its vocabulary. Everything you send and everything the model writes back is counted in tokens.
How many words is 1,000 tokens?
Roughly 600 to 800 English words. That comes from Google's rule of thumb for Gemini models, where a token is about 4 characters and 100 tokens is about 60 to 80 English words.
Treat it as an estimate. Code, numbers and languages other than English can take more tokens for the same amount of text, and the split changes from one model to the next. I write in Bulgarian as well as English, so I never trust a words-to-tokens rule. I count.
Why do tokens matter?
Because they decide what you pay and how much fits. API prices are set per token, and every model has a context window, which is the most tokens it can handle at once.
Repetition is where it adds up. Ruff, the assistant on this site, sends a 1,602-token system prompt with every message, as I describe in how we cut Ruff's system prompt. A prompt that size is small once and expensive thousands of times.
How do you count tokens?
Use a tokenizer, not a word count. Each provider has its own, so the right tool depends on the model:
| Model family | How to get the count | Exact? |
|---|---|---|
| OpenAI models on the o200k_base encoding | OpenAI's tiktoken library, or our Token Counter, which runs the same encoding | Yes, for text |
| Claude | Anthropic's token counting endpoint, which is free to use with rate limits | Anthropic calls it an estimate |
| Gemini | The count_tokens call in the Gemini API | Counts the input you pass it |
| Any other model | The provider's own counter | Depends on the provider |
The tiktoken source maps o200k_base to o1, o3, o4-mini, GPT-4o, GPT-4.1 and GPT-5. Anthropic says the number from its counter may differ by a small amount from what a real request uses. I checked all three pages on 25 November 2026.
Do all AI models count tokens the same way?
No. The same text gives a different count on each model family, and sometimes between versions of one family.
Anthropic's documentation is a good example: it says its newer models use a newer tokenizer that produces roughly 30% more tokens for the same input than earlier ones. So recount a prompt for the model you plan to use. In our Token Counter, every model that doesn't use o200k_base is labeled as an estimate for this reason.
How do tokens turn into cost?
Multiply the tokens by the model's price. Providers list a price per million input tokens and a separate price per million output tokens.
The Token Counter does this for you: it takes prices and context windows from OpenRouter's public model list and shows the date they were fetched. Prices change, and your own plan may differ, so check that date and your provider's pricing page.
How do you use fewer tokens?
Cut filler, say each instruction once and send only the context the model needs. Then check what you removed, because shorter isn't always safe.
When we ran 50 published system prompts through a compressor, 15,733 tokens became 3,844, but only 23 of the 50 prompts kept every instruction. For the methods that worked on our own prompts, see how to reduce AI prompt tokens, or try the Token Reducer.
FAQ
Is a token the same as a word?
No. A short common word is often one token, but longer words are split into several, and spaces and punctuation count too.
Are input and output tokens priced the same?
Often not. Providers list them separately, so check both prices for your model.
What is a context window?
It's the most tokens a model can take in one request, counting your prompt and its reply. Leave room for the answer, not just the prompt.
Is my prompt stored when I use the Token Counter?
No. The tools run on our server. We don't store what you enter. This tool doesn't use AI.
Updated November 25, 2026.

With over 25 years of experience in the information technology industry, he is a seasoned software engineer and a certified solutions architect. Regular content contributor for the site.
Connect on LinkedIn