Skip to content

Glossary

What is a token in AI?

The unit behind every AI limit and price, and the reason a long file can use up your allowance faster than you expect.

Updated

Definition

A token is the small chunk of text, often a word or part of a word, that an AI model reads and writes, and the unit its limits and prices are counted in. In English, a token is very roughly three-quarters of a word. Your prompt, any attached files and the reply all use tokens.

What a token is

A token is the basic unit of text an AI model processes. Before a large language model reads your message, it splits the text into tokens. The Google Gemini documentation says tokens can be single characters like z or whole words like cat, and long words are broken up into several tokens. In the paper, Sennrich et al. describe encoding rare and unknown words as sequences of subword units. Punctuation and numbers count too. The model then writes its reply token by token.

In English, a token is very roughly three-quarters of a word. The Google Gemini documentation says that for Gemini models a token is equivalent to about 4 characters. It also says 100 tokens is equal to about 60-80 English words, so a page holds a few hundred. The Google Gemini documentation defines the set of all tokens used by the model as its vocabulary.

Why tokens matter at work

You meet tokens in three places:

  1. The context window. Anthropic defines it as all the text a language model can reference when generating a response, including the response itself. That means your prompt, the files you attached, the conversation so far and its own reply together. See context window.
  2. Usage limits on a subscription. Plans cap how much you can do in a period, and heavy use of long files and long chats reaches the cap sooner.
  3. Pricing through an API. When a company builds AI into a tool, it is typically billed for tokens in and tokens out. The Google Gemini documentation says the cost of a Gemini API call is determined in part by the number of input and output tokens. See API.

What the documentation adds

An example

A team uploads a 40-page vendor contract. The tool warns that the file uses most of the available window. They split the contract into sections and ask about each, which keeps the request under the limit and makes the answers easier to check.

Tokens in a quick example

The sentence “Please summarize this contract” is about five tokens. A 40-page contract attached to it can be tens of thousands. The model’s reply is counted too, so a long answer to a long file uses tokens twice, once reading and once writing. That is why a short question about a big document can still trigger a limit, and why summarizing in sections often works better than one giant request.

Some tools show a running estimate of how full the window is. Others only warn you at the edge. If answers start ignoring early parts of a long conversation, that is a sign you have filled the window, and a fresh chat with a short summary of where you left off will usually fix it.

How to spend fewer tokens

  • Attach only the pages that matter instead of the whole file.
  • Start a fresh chat for a new task rather than continuing a very long thread.
  • Ask for a short format (“five bullets”) when you do not need an essay.
  • Do not paste the same background into every message; save it as reusable instructions.

For a worked example on long documents, see how to summarize long documents with AI and summarizing PDFs and contracts.

Token examples

These counts are rough and differ by model, but they show the idea:

  • A short, common word such as “the” or “cat” is usually one token.
  • A longer or rarer word, such as “unbelievable”, is often split into two or three tokens.
  • A number, a space or a punctuation mark can be a token of its own.
  • An email of about 150 words is roughly 200 tokens. A 40-page document is tens of thousands.

Token in AI is not the same as other tokens

The word “token” has other meanings. A crypto token is a digital asset on a blockchain, and a login or API token is a secret that proves who you are. An AI token is none of those: it is only a chunk of text the model counts. (If a tool asks you for an “API token” to connect it, that is the login kind, so keep it private.)

A common misconception

People often equate tokens with words or with the number of questions. Neither is exact. Long attachments, long replies and long chat history all use tokens, so a small prompt on top of a big file can still be expensive. Tokens also say nothing about quality: a longer answer is not a better one.

Learning to give an AI just the right amount of context is one of the practical skills in Learn AI Fast, a two-day in-person class in Boston for non-technical professionals.

Sources

Frequently asked

What is a token?

A token is a piece of text an AI model works with: a short word, part of a longer word, a number or a punctuation mark. Models read and write in tokens rather than letters or whole sentences.

What does 'tokens' mean on an AI plan or price list?

It is the unit used to count usage. Subscriptions set limits in relative terms based on tokens used, and companies that use AI through an API are billed per number of tokens sent and received.

How many tokens is a page?

A typical page of English text is a few hundred tokens, but it varies with the language, formatting and the tool. Code, tables and non-English text often use more.

Is a token the same as a word?

No. Short common words are often one token, while long or unusual words split into several. As a rule of thumb, 100 words is a little over 100 tokens in English.

What happens when I run out of tokens?

Within one conversation, you hit the context window limit and the tool may forget early material or ask you to start over. On a subscription you may reach a usage cap and wait for it to reset or upgrade.

// Free · AI automation starter kit

Get the starter kit

The copy-paste prompts and scripts from our guides in one place, plus a checklist for picking the first task worth automating. Free, sent to your inbox.

No spam. Unsubscribe any time by replying “stop”.