Back to Basics

What Are Tokens in AI and Why Do They Matter?

What Are Tokens in AI and Why Do They Matter?
AI Tutorials Team 30 April 2026

Tokens are the units a language model actually works with. They set the limit on how much you can paste in, they determine what an API call costs, and they explain several failures that otherwise look like a system being inexplicably stupid about very simple things.

What exactly is a token?

A token is a chunk of text, usually between one character and one word. Common words are single tokens. Longer or unusual words are split into pieces. Spaces and punctuation are included rather than ignored.

As a working figure for English, one token is around four characters, or roughly three quarters of a word. A thousand words is about thirteen hundred tokens. Code, unusual names and languages that do not use the Latin alphabet consume more, sometimes far more.

Why split text this way at all?

It is a compromise between two bad options. Working with whole words means a vocabulary that can never cover every name, typo and technical term, and no way to handle a word never seen before. Working with individual characters means a tiny vocabulary and sequences so long that they become impractical to process.

Subword tokens sit between the two. Frequent words get their own entry, rare words are assembled from pieces, and anything at all can be represented. The specific splits are learned from data rather than designed, which is why they occasionally look arbitrary.

What do tokens explain about model behaviour?

  • Letter counting failures. A model that sees a word as two or three chunks has no direct view of its individual letters.
  • Poor spelling tasks. Reversing a word or working with its letters means reasoning about something the model cannot see clearly.
  • Arithmetic errors. Long numbers split into token groups that do not line up with place value.
  • Uneven language costs. The same sentence in some languages costs several times more tokens than in English.
  • Odd behaviour on rare strings. Unusual sequences map to tokens the model saw very little of during training.

How do tokens set the context limit?

Every model has a maximum number of tokens it can hold at once, covering the system instructions, your prompt, any files you attached and the whole conversation so far, plus the answer being generated. Published limits run from a few thousand tokens to over a million.

Exceeding it does not usually produce an error in a chat interface. The oldest material is quietly dropped, which is why a long conversation eventually forgets an instruction you gave near the start. The instruction did not fail; it stopped existing.

How are tokens billed?

API pricing is per million tokens, with input priced lower than output, often by a factor of three to five. That asymmetry matters for design: pasting a long document is comparatively cheap, and asking for a long answer is comparatively expensive.

Two further wrinkles are worth knowing. Cached input, where the same context is reused across calls, is discounted heavily by most providers. And reasoning models generate hidden thinking tokens that you pay for without ever seeing, which is why a short answer from one of them can carry a surprising bill.

How can you estimate token use before you commit?

Divide the word count by three and add a quarter, which lands close enough for planning. For anything you are actually paying for, every major provider publishes a tokeniser tool that gives an exact count for a given string, and running your typical prompt through one takes a minute and removes the guesswork.

If a workflow is expensive, the usual culprits are re-sending a long document on every call and asking for verbose output. Trimming instructions rarely saves much, because instructions are short compared to the material they operate on.

Do you need to think about tokens day to day?

In a chat window, rarely. It is enough to know that very long conversations lose their beginnings, and that starting a fresh chat for a new task is usually better than continuing an old one.

Through an API, tokens are the unit of everything. Cost, latency and the ceiling on what fits are all measured in them, and a workflow designed without counting them tends to be discovered later, on a bill.