What Is a Token in an AI Chatbot?

AI services count your words in tokens, not words. Knowing what a token is explains limits, prices and why long chats get cut off.

Short answer

A token is a small chunk of text that an AI model reads and writes — sometimes a whole word, often part of one, plus spaces and punctuation. OpenAI’s rule of thumb for English is that one token is about four characters, or about three-quarters of a word. Models have limits on how many tokens they can handle at once, and API services usually charge per token.

In this article 10 sections
  1. Why models don’t just count words
  2. How the splitting works
  3. Rules of thumb (for English)
  4. Why other languages often cost more
  5. Pictures, audio and files count too
  6. Why tokens matter to you
  7. The practical answer
  8. Common mistakes
  9. Common questions
  10. Related guides
A hand holding a smartphone showing a ChatGPT answer in front of an open laptop.
Chatbots such as ChatGPT write fluent answers, which is exactly why a wrong one can be hard to spot. Photo: Jernej Furman from Slovenia / Wikimedia Commons, CC BY 2.0

Why models don’t just count words

Before a model can work with your message, it splits the text into pieces it has a fixed vocabulary for. Common words may be a single piece; rarer words are split into several. Spaces and punctuation count too. OpenAI describes tokens as the units its models use to process text, and a single token can be one character, part of a word, a whole word or a punctuation mark.1

What you might see

A short, everyday sentence might be a dozen tokens. An unusual name or a word in a less common language can take several tokens on its own.

How the splitting works

OpenAI’s models use a method called byte-pair encoding, or BPE. Its open-source tokeniser, tiktoken, explains that models don’t see letters as we do; they see a sequence of numbers, and BPE is the way text gets turned into those numbers.2

The method is reversible, so tokens can be turned back into the original text, and it copes with words the tokeniser never saw while being built. It also tries to give common word parts their own tokens: “encoding” is often split into “encod” and “ing”, so the model meets “ing” again and again and can learn how it behaves in grammar.2

Small details change the result. OpenAI notes that the count depends on the model, the language, capital letters, spacing and the surrounding text, so a token count is not the same as a word count.1

Rules of thumb (for English)

Approximate token counts — OpenAI’s estimates for English
TextRoughly
1 token4 characters, or ¾ of a word
100 tokens75 words

These are estimates. OpenAI says the ratios apply to English and that other languages follow different patterns.1 Google gives a similar guide for its Gemini models: about four characters per token, with 100 tokens equal to roughly 60–80 English words.3

Even the same company’s models can differ. Anthropic says its Claude 4.7 and later models use a newer tokeniser that turns the same text into roughly 30 per cent more tokens than earlier models did.4

A worked example

Say you paste in a 1,500-word report. Using OpenAI’s ¾-of-a-word rule, that is about 2,000 tokens. Using Google’s 60–80 words per 100 tokens, it is somewhere between about 1,900 and 2,500 tokens. Treat it as a ballpark, not a bill.

Why other languages often cost more

OpenAI’s help page points out that a higher ratio of tokens to characters can make using its API more expensive in languages other than English.1

Screenshot of a ChatGPT reply written in Finnish, with several paragraphs of text about esports.
A chatbot reply in Finnish. Text in languages other than English often splits into more tokens for the same meaning, so it uses more of the limit and costs more through an API. Screenshot: Osmo Lundell / Wikimedia Commons, CC BY-SA 4.0

In a peer-reviewed study presented at the NeurIPS 2023 conference, researchers at the University of Oxford found that the same text translated into different languages can produce token counts that differ by up to 15 times. That means higher costs, slower responses and less room in the model’s working memory for some speakers, and the gap remains even with tokenisers built for many languages.5

Pictures, audio and files count too

Tokens are not only for text. Google says Gemini counts a small image (384 pixels or less on both sides) as 258 tokens, while larger images are cut into tiles of 768 by 768 pixels at 258 tokens each. Video counts at about 263 tokens a second and audio at 32 tokens a second.3

Anthropic says everything in a request uses up the context window, including images, documents and tool results, as well as the reply Claude writes.6

Why tokens matter to you

  • Length limits. The context window is the cap on how many tokens a model can handle at once, and it must also leave room for the answer.1 Anthropic describes it as the model’s “working memory”, separate from the data it was trained on.6
  • Concrete sizes. Google lists a context window of 1,048,576 tokens (about a million) for recent Gemini models.3 Anthropic lists 1 million tokens for many current Claude models and 200,000 for others.6
  • Price. API services charge per token, and input, cached input and output can each have different rates.1 Google says the cost of a Gemini API call depends partly on the number of input and output tokens.3
  • Hidden thinking. Reasoning models use tokens to work through a problem before answering. You don’t see them as text, but OpenAI bills them as output tokens, so a short answer may use more than it seems.1 Anthropic says Claude’s thinking tokens count towards the context window and are billed as output.6
  • Bigger isn’t always better. Anthropic warns that as the token count grows, accuracy and recall can decline, an effect it calls “context rot”.6

The practical answer

  1. Shorten or rephrase long prompts, and remove repeated or unneeded background.1
  2. Split big documents into smaller parts, or summarise them first.1
  3. Check a real count when it matters. OpenAI’s Tokenizer tool shows how text is split.1 Anthropic offers a free token-counting tool for developers that handles text, images and PDFs, though it notes the result is an estimate.4
  4. Recount when you switch models, because a count for one model may not hold for another.4

For more on getting good results from fewer words, see How to Write a Good Prompt for an AI Chatbot.

Common mistakes

  • Treating tokens as words. A token count is not a word count, and other languages often split into more pieces.1
  • Forgetting the reply. The context window covers the model’s answer as well as your message.6
  • Assuming the cheapest rate wins. OpenAI notes that a lower price per million tokens doesn’t guarantee a lower total cost, because models tokenise and reason differently.1
  • Pasting everything “just in case”. Extra material can make answers worse, not better.6

If you are sharing documents with a chatbot, read How to Use AI Chatbots Safely first.

Common questions

How many words is 1,000 tokens?

For English, roughly 750 words using OpenAI’s rule of thumb, or about 600–800 using Google’s.1,3 Other languages can work out quite differently.1

Why do tokens matter if I use a free chatbot?

You may not pay per token, but the context window still applies, so a very long chat cannot all fit forever. Anthropic names “compaction”, which condenses earlier material, as its main approach for long conversations, and warns that recall weakens as context grows.6 That is one reason a chatbot can lose track of details; see also why AI sometimes makes things up.

Can I see my token count?

Developers can. OpenAI offers its Tokenizer and a counting tool, and Google and Anthropic provide their own counting tools.1,3,4

Sources and further reading

  1. Understanding and counting tokens — OpenAI Help Center
  2. tiktoken: What is BPE anyway? — OpenAI (GitHub)
  3. Understand and count tokens — Google AI for Developers
  4. Token counting — Anthropic (Claude Platform Docs)
  5. Language model tokenizers introduce unfairness between languages — Oxford University Research Archive2024
  6. Context windows — Anthropic (Claude Platform Docs)

Was this article helpful?

Comments

No comments yet. Questions and tips from readers are welcome.