What are tokens in AI? Examples, limits and costs explained

Understand AI tokens with verified examples, a simple guide to context and usage limits, and a checklist for prompts that are too long.

The text Hello, world! splits into four coloured token tiles: Hello, comma, space plus world, and exclamation mark.
In this example, Hello, world! splits into four tokens; the space belongs with world.AI illustration: Tech Day Book
On this page
  1. A token is a piece of text, not necessarily a word
  2. The same text can have different token counts
  3. Four terms that are easy to mix up
  4. A larger context window is not perfect memory
  5. Do AI tokens mean a separate bill?
  6. A checklist for prompts that are too long

A token is a piece of text, not necessarily a word

In a text-based AI model, a token is a small unit the model processes. It can be a whole word, part of a word or a punctuation mark. Counting the words in your prompt will not give you an exact token count. [1] [2]

A tokenizer is the software that turns text into these units and their numeric identifiers. Those numbers identify entries in its vocabulary; they are not definitions of what the words mean. OpenAI’s tiktoken can turn the sequence back into the original text. [1] [2] [3]

A useful English estimate is 100 tokens for roughly 75 words. Treat that as a rough size check: language, capitalization, spaces and the encoding—the rules used to split the text—can change the result. [1]

The same text can have different token counts

We checked the plain-text examples below on 13 October 2026 using OpenAI’s tiktoken 0.14.0. The column names identify three different encodings. This used local counting software. It did not ask an AI model to generate an answer or use a paid AI service. [2] [3]

In all three, Hello, world! becomes four pieces: Hello, the comma, a space attached to world, and the exclamation mark. Punctuation matters. The arithmetic and long-word examples also reproduce the counts in OpenAI’s cookbook. [2] [3]

Matching counts do not guarantee matching pieces. For the long word below, cl100k_base includes establish and ment as separate pieces; o200k_base uses est and ablishment instead. These are encoding examples, not a ranking of today’s AI models. [3]

Exact text r50k_base cl100k_base o200k_base
Hello, world! 4 4 4 [2]
2 + 2 = 4 5 7 7 [3]
antidisestablishmentarianism 5 6 6 [3]

Four terms that are easy to mix up

A token count describes an amount of data. A context window describes capacity for a response, while an account allowance governs your access to a service. Making a prompt shorter and waiting for an allowance reset solve different problems. [1] [3] [5] [6]

Term Plain-English meaning What to check
Input tokens What is supplied to the model. Included text and other request material. [1] [3]
Output tokens What the model generates. The output limit; internal reasoning can count beyond the visible answer. [1] [3]
Context window The working material the model can use for a response, including response space. The model’s documented capacity and the app’s handling of long conversations. [5]
Account allowance The service usage available under your plan. Your account’s current usage and reset notice. [6]

A larger context window is not perfect memory

Think of context as working space, separate from the material used to train the model. More space lets you supply more information, but it does not guarantee the model will use every detail accurately. [5]

Do not assume every app quietly forgets the oldest message when it fills up. Tools handle long conversations differently: they may summarize earlier material or return an error. Anthropic’s documentation describes both context management and overflow behavior. Check the tool you are actually using. [5]

Do AI tokens mean a separate bill?

Not automatically. OpenAI documents separate billing for ChatGPT subscriptions and the API platform. An API’s per-token price is not automatically a bill for each word you type into ChatGPT. API charges also depend on the model and any applicable tool or storage use. [4]

For services such as Codex, the plan’s usage allowance depends on more than a simple word count. Check the account’s usage notice before assuming that a limit requires buying API credit. A context limit and an exhausted account allowance are different restrictions. [6]

A checklist for prompts that are too long

First read the warning. Then choose the action that matches it; shortening a document cannot reset an exhausted account allowance. These steps are practical guidance, not a promise that every tool handles limits the same way. [1] [5] [6]

  1. Identify whether the warning concerns input or context capacity, output length, or your account allowance. [1] [5] [6]
  2. Keep the passages relevant to the task. Remove repetition while preserving clear instructions. [1] [5] [6]
  3. Split a large document or task into manageable parts. Carry forward a short summary and check it for missing details. [1] [5] [6]
  4. For an exact text count, use the tokenizer that matches the target model. Remember that message formatting and tools can add to the complete request. [1] [3] [5] [6]
  5. Check the service’s own usage page for account limits, credits and reset information. [6]

Sources

  1. Understanding and counting tokens
  2. tiktoken: OpenAI’s open-source tokenizer
  3. How to count tokens with tiktoken
  4. Managing billing for ChatGPT and the API platform
  5. Context windows
  6. Using Codex with your ChatGPT plan

James Carter

AI tools · AI privacy · Practical workflows

James Carter is the editorial pen name for Tech Day Book’s AI coverage. Articles under this byline explain AI tools, privacy settings and practical workflows, with a focus on what the documentation supports and what readers should check before relying on a tool.

All articles by James Carter →