Start practice

What is a token in AI?

Advanced ·

AI models do not read words; they read tokens, small pieces of text. A token is often a short word, part of a longer word, or a punctuation mark. Tokens matter because they set how much text a model can handle at once, how fast it answers and what it costs.

How text becomes tokens

For English, a common rule of thumb is that one token is about four characters, or about three quarters of a word. Turned around:

Formula
tokens ≈ words × 4 ÷ 3

So 300 words is about 400 tokens. The exact number depends on the model and the text: common words are often one token, rare words and names are split into several, and numbers, code and many other languages usually take more tokens per word.

TextWordsTokens, about
A short question1520
A typical email150200
A one page document450600
A 10 page report4,5006,000
A long chat with pasted files30,00040,000

Examples

Estimate a prompt

You paste a 600 word document and write a 50 word request. That is 650 words, so about 650 × 4 ÷ 3 ≈ 867 tokens of input. If you ask for a 150 word summary, the output is about 200 tokens.

Why a long chat gets slower and costs more

Each new message in a chat usually sends the earlier conversation along as context. After an hour of back and forth with pasted files, a short question may carry tens of thousands of tokens with it. Starting a new chat for a new topic keeps that down.

Input and output prices

AI services that charge per use usually price per million tokens, and output tokens usually cost more than input tokens. With example prices of $3 per million input tokens and $15 per million output tokens, a request with 1,000 input tokens and 500 output tokens costs:

Formula
1,000 ÷ 1,000,000 × $3 + 500 ÷ 1,000,000 × $15 = $0.003 + $0.0075 = $0.0105

About one cent. These are example prices only; real prices differ by model and change often, so check the provider's price page.

Where tokens matter to you

SituationWhat tokens decide
Free or paid chat plansUsage limits are often based on tokens or messages
Pasting a long documentWhether it fits in the model's context window
Paying per use (API)The bill: input and output tokens times the price
AgentsMany steps, each with tokens, add up quickly

Variants

  • Context window: the maximum number of tokens a model can consider at once, including your prompt, files, earlier messages and its answer.
  • Token counters: some providers offer a tool that shows the exact token count for a text.
  • Other languages: many languages use more tokens per word than English, so the same message can cost more.
  • Images and files: these are turned into tokens too, sometimes many.

Estimate a long report

A 10 page report of about 4,500 words is about 4,500 × 4 ÷ 3 = 6,000 tokens. Asking for a one page summary of about 450 words adds about 600 output tokens. If you paste the same report into five different chats with five questions, you pay for the 6,000 input tokens five times. One chat with all five questions, or one summary reused for the rest, is cheaper.

Common mistakes

Thinking one word is one token

It is closer to three quarters of a word in English, and more for numbers, code and many languages.

Ignoring output tokens

Long answers cost more than long questions, because output is usually priced higher. Asking for a short answer saves the most.

Keeping one chat forever

Old context rides along with every message. Start fresh for a new topic. More in how to save AI tokens.

Practice

The level "What is a token?" has you estimate tokens for real texts with words × 4 ÷ 3 (answers within a small tolerance count) and answer questions about what tokens affect. The next level adds prices per million tokens, and the one after that the habits that save money. For agents, where token use grows fastest, see AI agent vs automation.

Practice: What is a token?

Free, in your browser, no sign up. Opens level “What is a token?”.

FAQ

How many tokens is a word?

In English, about 1.3 tokens per word on average, or roughly four characters per token. Rare words, names, numbers and other languages often take more.

Why do AI tools count tokens?

Tokens are the units the model reads and writes. They set the context window, the speed and, for paid use, the price.

Do tokens matter if I use a free chat?

Indirectly. Usage limits on free and paid plans are often tied to how much text you send and receive.

For learning only. Nothing here is legal, financial or tax advice. Sample AI replies in the practice are written in advance, and all names and numbers are made up.