Uni-Sine
AI
+25XP
AIHow AI works

What is a token in AI?

"AI token" has a second meaning: it can also be a cryptocurrency linked to an AI project. That is a different thing, and this page isn't about it. Here, a token is a unit of text. If you came for the crypto kind, our Cryptocurrencies course is the place to start.

What are AI tokens?

AI tokens are the units a language model uses to read and write text. Language models work on numbers, not letters. Before your text reaches the model, a program called a tokeniser (tokenizer in the US) chops it into tokens and swaps each one for an ID number from a fixed list called a vocabulary. The tokeniser built for GPT-4o has a vocabulary of about 200,000 tokens.

Here is real output from that tokeniser. Each pair of square brackets is one token.

Text:    The cat sat on the mat.
Tokens:  [The] [ cat] [ sat] [ on] [ the] [ mat] [.]
IDs:     976   9059   10139  402   290    2450   13

That sentence has 6 words but 7 tokens, because the full stop (period in the US) is a token of its own. The space travels with the word after it, so " cat" with a space (9059) and "cat" without one (8837) are different tokens to the model.

The model never sees your words, only those numbers. To reply, it scores the likely next tokens, picks one, adds it to the text and repeats. Our AI Models course shows how a transformer makes those predictions.

Interactive calculatorLanguage Model SimulatorPaste your own text, see each token with its ID, then watch a tiny teaching model pick the next token. It uses whole words or characters as tokens, so its splits are simpler than the ones on this page.

How do AI tokens work?

Splitting text into tokens is called tokenisation (tokenization in the US). A tokeniser learns its vocabulary from a huge amount of text, so common strings of characters become single tokens and rare ones get built from smaller pieces. Every split below is real output from the GPT-4o tokeniser.

TextHow it splitsTokensCharacters
Hello, world![Hello] [,] [ world] [!]413
tokenisation[token] [isation]212
unbelievable[un] [bel] [ievable]312
don't[don] ['t]25
HELLO[HEL] [LO]25
1234567[123] [456] [7]37
1,000,000[1] [,] [000] [,] [000]59
Wow!!![Wow] [!!!]26
  • Common words are usually one token. Long or rare words split into pieces.
  • Capitals matter. "Hello" is one token, but "HELLO" takes two.
  • Punctuation usually stands alone, though a common run like "!!!" can share a token.
  • Numbers split into groups of up to three digits, so phone numbers and long IDs use more tokens than you might guess.

Why token splits vary by model

There is no universal split. Each family of models has its own tokeniser, so the same text gives different counts. Here is "Hello, world!" in five languages on three OpenAI tokenisers.

TextLanguageGPT-3GPT-4GPT-4o
Hello, world!English444
¡Hola, mundo!Spanish855
Привет, мирRussian1264
你好,世界Chinese1163
नमस्ते दुनियाHindi23139

Newer tokenisers handle other languages far better, but the count can also go up. Anthropic says Claude Opus 4.7 and later models use a newer tokeniser that produces about 30% more tokens for the same text. So never reuse a token count from one model on another.

How many tokens is a page, a book or a chat?

You rarely need an exact count. For English, use the rule of thumb that OpenAI publishes: one token is about four characters, or about three quarters of a word. Google gives the same four characters for Gemini, with 60 to 80 English words per 100 tokens.

\text{tokens}\approx\frac{\text{characters}}{4}\approx\frac{\text{words}}{0.75}

A token is shorter than a word, so there are more tokens than words. That is why you divide by 0.75, which is the same as adding a third.

TextSizeWorkingTokens
A short social media post280 characters280 ÷ 470
A page of text500 words500 ÷ 0.75About 670
A novel90,000 words90,000 ÷ 0.75120,000
A chat of 20 exchanges40 word question, 200 word reply20 × 240 = 4,800 words, then 4,800 ÷ 0.756,400

Does it work on real text? The quick answer at the top of this page is 323 characters and 65 words. The rule predicts 81 tokens from the characters and 87 from the words. The GPT-4o tokeniser counts 75, which is close enough to plan with but not exact.

Why tokens matter

Tokens are how AI services measure what you use, so they explain most of the limits you run into.

Cost

Developers who connect apps to a model through an API are usually charged for every token, in both directions. The next section shows how much.

Context window

A model's context window is the number of tokens it can work with at once. Everything counts: your prompt, the chat so far, any files, the system instructions and the reply itself. The leading models in the table below hold about 1 million tokens, which is about 555,000 words on current Claude models. Bigger isn't automatically better, though. Anthropic warns that accuracy and recall fall as the token count grows, so a focused prompt can beat a huge one.

Speed

A model writes one token at a time, which is why replies appear bit by bit. Longer prompts and longer replies generally take longer. You can step through that loop yourself in our Language Model Simulator.

Why AI forgets earlier parts of a long chat

The model doesn't hold your chat in its head between messages. Each turn, the conversation so far goes back in as input, with your new message on the end. Once that no longer fits in the context window, something has to go. Chat apps may drop the oldest messages first or replace them with a summary, which is why a detail from the start of a long chat can vanish.

It also means long chats use tokens faster than you would expect. Say you type 50 tokens each turn and the model replies with 250. Turn 1 sends 50 input tokens. Turn 2 sends 350: your first message, the reply and your new message. By turn 20, one message sends 5,750 tokens. Across all 20 turns that adds up to 58,000 input tokens, even though you only typed 1,000.

y = 0.15{ x}^{2}-0.1 x
246810121416182022242040608010014,000 tokens58,000 tokens
Drag to pan, scroll to zoom. x from 0 to 25, y from -18.3 to 110.

Here x is the number of turns and y is the total input tokens in thousands. The curve bends upward because every turn carries all the turns before it. Doubling the chat from 10 turns to 20 roughly quadruples the input tokens, from 14,000 to 58,000.

How much do AI tokens cost?

A single token costs a tiny fraction of a cent, so providers quote prices per million tokens. At $2 per million, one token costs $0.000002. Prices have two parts: input tokens are what you send, and output tokens are what the model writes. Output costs more, at five times the input price on every model below. Models that reason before they answer bill those thinking tokens as output too.

These are standard prices on 7 November 2026, from the official pages of Anthropic, OpenAI and Google. Prices change often, so check those pages before you budget.

ModelInput, per 1M tokensOutput, per 1M tokensContext window
Claude Fable 5.1$10$501M
Claude Opus 5.5$4$201M
Claude Sonnet 5.5$2$101M
Claude Haiku 5.5$0.10$0.501M
GPT-6 Astra$10$501.05M
GPT-6.1 Sol$2$101.05M
GPT-6 Luna$0.10$0.501.05M
Gemini 4 Argon$2, then $4 from 1 Dec 2026$10, then $20 from 1 Dec 20261,048,576
Gemini 3.8 Flash$0.75, then $1.50 from 1 Jan 2027$3.75, then $7.50 from 1 Jan 20271,048,576

Claude Haiku 5.5 has this price for prompts up to 100,000 tokens, and OpenAI's prices apply up to 272,000 input tokens. Longer prompts cost more. To work out a cost, turn tokens into millions and multiply by the price.

\text{cost}=\frac{\text{tokens}}{1000000}\times\text{price per million}

Example 1: one message

A model charges $2 per million input tokens and $10 per million output tokens, as Claude Sonnet 5.5 and GPT-6.1 Sol did on 7 November 2026. You send 1,000 tokens and get 500 back.

  • Input: 1,000 ÷ 1,000,000 × $2 = $0.002
  • Output: 500 ÷ 1,000,000 × $10 = $0.005
  • Total: $0.007, which is less than a cent

Example 2: summarising a novel

On the same model, you send the 120,000 token novel and get a 1,000 token summary back.

  • Input: 120,000 ÷ 1,000,000 × $2 = $0.24
  • Output: 1,000 ÷ 1,000,000 × $10 = $0.01
  • Total: $0.25

Example 3: a support chatbot on two models

A chatbot handles 10,000 conversations a month, each using 3,000 input tokens and 400 output tokens. That is 30 million input tokens and 4 million output tokens.

  • At $2 and $10 per million: (30 × $2) + (4 × $10) = $60 + $40 = $100 a month
  • At $0.10 and $0.50 per million: (30 × $0.10) + (4 × $0.50) = $3 + $2 = $5 a month

The cheaper model costs a twentieth as much. If it does the job well enough, that one choice saves more than any amount of prompt trimming.

Try one yourself

This question asks for a token estimate or a cost, using the methods above.

Use a rule of thumb to estimate a token count or a cost, typed as maths.

Press Mark to have your answer marked in the AI Prompt Engineering course.

How to reduce AI token usage

These tips work whether you want to stay under a usage limit or cut an API bill. The first ones save the most.

  • Send only what the model needs. Paste the 2,000 word chapter you are asking about, not the 90,000 word book. That cuts your input from about 120,000 tokens to about 2,700.
  • Start a new chat when the topic changes. Old messages go back in every turn. To keep the useful parts, ask for a short summary and paste it into the new chat.
  • Ask for a shorter reply. Output tokens cost more and fill the context window too, so "Answer in three bullet points" is a cheap instruction that saves real tokens.
  • Pick the smallest model that does the job. Example 3 shows how big that difference can be.
  • Use batches and caching if you build with an API. Anthropic takes 50% off batch requests, and OpenAI charges GPT-6.1 Sol's cached input at $0.10 per million instead of $2.
  • Trim padding, not context. "Summarise the report below in three bullet points." is 11 tokens. The same request wrapped in polite small talk came to 42. Saving 31 tokens barely matters once, but it adds up in a prompt that runs thousands of times. Never cut details the model needs: redoing a vague prompt costs more.

Our AI Prompt Engineering course teaches you to write short prompts that still get sharp replies.

Common mistakes with AI tokens

  • Treating tokens as words. One word can be several tokens, and a full stop can be a token by itself.
  • Multiplying by 0.75 instead of dividing. 500 words is about 670 tokens, not 375. Expect more tokens than words.
  • Forgetting the reply. Output counts towards the context window and costs more than input.
  • Forgetting the history. Every turn re-sends the chat so far, so turn 20 uses far more input tokens than turn 1.
  • Reusing a count across models. Each tokeniser splits text its own way, so recount on the model you plan to use.
  • Using the rule on images and files. OpenAI warns that estimates like characters ÷ 4 are inaccurate for these.

Common questions

What are tokens in large language models (LLMs)?
They are the same tokens described on this page. A large language model (LLM) such as GPT, Claude or Gemini takes in your text as a list of token IDs, predicts the next token, adds it and repeats. Its context window and its price are both measured in tokens.
How much does an AI token cost?
Usually a tiny fraction of a cent. On 7 November 2026, the models in the table above ranged from $0.10 to $10 per million input tokens and from $0.50 to $50 per million output tokens. At $2 per million, one token costs $0.000002.
Is a token the same as a word?
No. Short common words are often one token, but long or rare words split into several, and punctuation can be a token of its own. In English, 100 tokens is about 75 words.
Do I pay for tokens on ChatGPT or Claude?
Not directly on a monthly plan. ChatGPT and Claude subscriptions are billed separately from their APIs, and the API is the part charged by the token. Tokens still affect you, though: Anthropic says your Claude Pro messages depend on message length, attached files, the length of the conversation and the model you use.
Do images and files use tokens?
Yes. Google says all input to and output from the Gemini API is tokenised, including images and files, and OpenAI says images use tokens based on their size and detail level. The characters ÷ 4 rule doesn't work for them.
How do I count tokens exactly?
Use the counter from the company that makes your model, since only that matches its tokeniser. Anthropic, OpenAI and Google all offer one through their APIs. If you don't use an API, the rule of thumb is close enough.

Revision cards

Read the front, say your answer, then flip to check.

Where to go next

  • Solve it

    Language Model Simulator

    See tokens, next word odds and temperature at work

    Open the tool
  • Learn it

    AI Prompt Engineering

    Prompts, agents and multi-agent workflows for large language models

    Start the course
Read next
AI · How AI worksLanguage model simulator: tokens, next words, temperatureFree language model simulator: see how text becomes tokens, what odds a model gives each next token, and how temperature changes what it writes.