Skip to content

Token

Also called: tokens

Published:

How is text split into tokens?

Before a model sees any text, the text is split into tokens, a step called tokenization [1]. A token can be a single character like z or a whole word like cat, and long words are broken into several tokens [1]. The full set of tokens a model uses is its vocabulary [1]. Google's machine learning crash course describes a token the same way, as a word, a subword or a single character, and sums up the job of a large language model as predicting a token or sequence of tokens [2].

How many characters is a token?

For Gemini models, Google puts a token at about 4 characters, and 100 tokens at roughly 60 to 80 English words [1]. That ratio is given for English, so don't assume it holds for every language.

You can check a real sentence. Pass "The quick brown fox jumps over the lazy dog." to count_tokens before sending a request, then read the actual usage from the response afterwards [1]. Tokens are not limited to text either: an image of 384 pixels or less on both sides counts as 258 tokens, and audio comes to about 32 tokens per second [1].

Why does the token count matter?

The first reason is cost. With billing enabled, the price of a Gemini API call depends partly on the number of input and output tokens [1]. The second is capacity, because the amount of material a model can handle at once is also measured in tokens. As of November 2026, Gemini 4 models, for example, share a single 1,048,576-token window across input, thinking and output [1].

Frequently asked questions

Is a token the same as a word?

No. Short, common words are often one token, while longer words are split into several.

Can I count tokens before sending a request?

Yes. Tools such as count_tokens in the Gemini API return the token count without running the request.

Sources

  1. Understand and count tokens — Google AI Studio
  2. LLMs: What's a large language model? — Google for Developers