Updated 2026-03-26

What are tokens in AI?

Filed under AI & modern tech

Why tokens matter

Pricing, speed, and context limits are usually measured in tokens. If a model has an 128k context window, that means it can consider roughly that many tokens of combined input and output at once.

A short English sentence might be 10–20 tokens. A long document can be thousands.

Tokens vs words

Tokens are not a perfect 1:1 match with words. Common words may be one token. Rare words, code, or other languages may split into several tokens. That is why two paragraphs with similar length can cost different amounts to process.

  • "hello" may be one token
  • A long URL or code snippet can use many tokens
  • Chat history counts toward the token limit

Common questions

Do more tokens always mean better answers?

No. More context can help, but noisy or irrelevant text can also confuse the model. Quality of input usually matters more than dumping everything in.

Glossary terms

Keep reading