What Are AI Tokens? How ChatGPT and Gemini Count Tokens and Charge for Them

What are AI tokens? Learn how large language models (LLMs) break text into tokens and why tokens determine speed, memory limits and cost.
What are AI tokens? How tokens are counted and how they affect LLM costs

This article is about tokens in artificial intelligence. If you’re looking for bank security tokens (OTP codes) or crypto tokens, see the comparison just below.

AI tokens are the small units of text that language models like ChatGPT, Gemini and Claude read and generate. A token can be a word, part of a word, a punctuation mark or a space. Conversation length limits, response length and API costs are all measured in tokens.

For example, when you ask an AI tool to “Write a polite follow-up email,” the system doesn’t process the sentence the way a person sees it. The text is split into smaller units before the model processes it. Learn more about models in What is a large language model?.

Key Takeaways

  • What it is: An AI token is a unit of text that a language model reads or generates. It can be a word, part of a word, a punctuation mark or another string of text.
  • How it works: The model splits input text into tokens, processes them and then generates a response as output tokens.
  • Why it matters: The number of tokens affects how much information the model can consider, how long responses can be and, in systems that charge by the token, usage costs and processing time.

How are AI tokens different from bank tokens and crypto tokens?

They share the word “token,” but these are three different concepts:

Token type What it is Where it’s used
AI token A piece of text processed by a language model ChatGPT, Gemini, Claude, AI APIs
Bank token (soft/hard token) A one-time passcode (OTP) for authentication Logging in, money transfers
Crypto token A digital asset issued on a blockchain Crypto exchanges, digital wallets

AI tokens are not the same as crypto tokens. An AI token is a unit of text processed by a language model; a crypto token is a digital asset tied to a blockchain system (Decagon).

What is an AI token?

An AI token is a basic piece of text that a large language model processes. A token isn’t necessarily a complete word. Depending on the text and the model, a token can be a common word, part of a longer word, a number, a punctuation mark or another short string of text (Decagon).

When you paste in a project brief and ask an AI assistant to summarize it, the words, punctuation, formatting and instructions become input tokens. The summary the model generates becomes output tokens. The model processes these units rather than the raw text exactly as it appears on screen.

Token boundaries are determined by each model’s text-processing method. So “token” shouldn’t be treated as a synonym for “word.”

Tokens are not the same as words or characters

A token is a unit chosen by a language model’s text-processing system, not a fixed linguistic unit or character. A word is the unit people use when writing and reading; a character is a letter, digit, space or punctuation mark.

Unit Meaning Why it matters
Word A familiar linguistic unit, usually separated by spaces or punctuation Useful for everyday writing and gauging document length
Character A letter, digit, space or punctuation mark Makes up the visible text
Token A piece of text processed by a language model Used in model processing, limits and sometimes billing

A short, common word may be represented by a single token. A long or unfamiliar word may be split into several pieces. Punctuation may be its own token or merged with nearby text, depending on the model’s rules. As a result, uncommon names, abbreviations, code, tables and repeated symbols can use more tokens than the word count suggests.

A 1,000-word document doesn’t have a fixed token count either. The result depends on the language, formatting, vocabulary and the model being used.

How does AI turn text into tokens?

AI turns text into tokens through tokenization, the process of splitting text into the units a model uses for processing. The system then represents these units in a form the model can work with (Decagon).

The process from request to response:

Process diagram: what are AI tokens - What are AI tokens? How tokens are counted and how they affect LLM costs
Process diagram What are AI tokens How tokens are counted and how they affect LLM costs

For example, when you ask AI to summarize meeting notes:

1. You enter a request. It may include the meeting transcript, instructions and the output format.
2. The system splits the text into tokens. This is the input the model processes.
3. The model generates a response. The summary is produced step by step as output tokens.
4. The app displays the result. You see ordinary words and sentences, even though the model generated them as tokens.

A tokenizer is the set of rules or process used to split text into tokens. Modern systems may use methods related to Byte Pair Encoding, WordPiece or SentencePiece. You don’t need to understand these algorithms to use AI; the key point is that each model may split text into different pieces before processing it.

See also How large language models work.

Why can the same text have different token counts?

The same sentence can produce different token counts across AI models because each model may use its own tokenizer. Brand names, abbreviations, numbers or strings of punctuation may be split in different ways (Decagon).

For example, a heading containing abbreviations, product codes and symbols may be split into more pieces by one model than by another. Neither model is necessarily counting wrong; they’re using different segmentation rules.

Keep this in mind when comparing tools, estimating context usage or planning API requests. Token estimates are useful for planning, but they aren’t a universal conversion formula across all providers.

Input tokens and output tokens

Tokens show up in two main places: the information sent to the model and the response the model generates.

Token type What it includes Workplace example
Input tokens The request, pasted documents, instructions and relevant conversation history A project brief and instructions for writing an executive summary
Output tokens Text generated by the model The executive summary returned by the AI

Input tokens include your question, system instructions, previous messages, attached or pasted documents and any other context provided to the model.

Output tokens are the pieces of text generated in the response. A short answer usually uses fewer output tokens than a detailed report, but the exact count depends on the model and the content.

In systems that measure usage in tokens, both input and output can affect consumption. Consumer products may reflect this through message limits, usage indicators, plan restrictions or other mechanisms rather than a token bill. Details vary by product; don’t assume every AI tool displays or charges for tokens the same way (Pivot Point Security).

How many words is one AI token?

For English text, a rough estimate is that one token equals about four characters, or roughly three-quarters of a word. This isn’t a fixed formula. Vocabulary, punctuation, formatting, language and the tokenizer can all change the result (Decagon).

By this estimate, a 750-word English draft might come to about 1,000 tokens. The figure is only suitable for general planning; it shouldn’t be used to reconcile invoices or to determine for certain whether a request fits within a model’s limit.

The estimate is less reliable for code, tables, uncommon names, multiple languages or lots of symbols. When you need precision, use the tokenizer or usage meter for the relevant model. Don’t apply the English estimate to every language.

Why do tokens matter when using AI?

Tokens matter because they directly relate to how much information the model can consider, how long responses can be and usage in token-based systems.

1. Available context: Long documents, detailed instructions and extended conversations can take up much of the text capacity of a single interaction.
2. Response length: A detailed report usually generates more output tokens than five bullet points. Some apps also set a maximum response length.
3. Usage and cost: In token-based systems, longer requests and responses usually use more tokens. Resending unnecessary conversation history can increase total usage (Pivot Point Security).
4. Processing time: Longer text may require more processing. The actual experience also depends on the model, app, infrastructure and system load.

For example, when you paste in an entire lengthy company policy and ask for a detailed answer, the document takes up input capacity and the response takes up output capacity. If the request is too large, the app may need to shorten, summarize or drop some of the information. This is the basis for understanding the concept of the context window.

Tokens and the context window

The context window is the amount of information an AI model can consider in a single request or interaction. It’s measured in tokens and can include the request, relevant conversation history, documents, instructions and the generated output.

The context window is not the same as long-term memory. It describes the working information the model can use in a specific interaction. A system may have features that save information across conversations, but that’s a separate mechanism.

In a long conversation about a project, as meeting notes, decisions, edits and drafts pile up, the app may need to summarize older messages or drop some information. If a later response misses an earlier detail, that detail may no longer be in the active context.

See What is an AI context window? to learn more. Don’t assume a specific window size without checking the current documentation for the model you’re using.

Simple ways to use tokens more wisely

Using tokens efficiently means providing enough relevant information for the task and removing repetition that doesn’t help the model.

1. State the task and the desired outcome. Say whether you need a summary, a comparison, a draft, a checklist or an analysis.
2. Provide relevant context. Include the facts, audience, constraints and source material needed.
3. Remove repetitive content. Delete duplicate instructions, repeated passages and irrelevant background.
4. Organize long documents. Use clear headings, labels, dates and sections.
5. Specify an appropriate response length. You can ask for a short email, a one-page summary or a detailed analysis.
6. Check the results. A shorter answer isn’t automatically better; verify the important details.
7. Summarize or start over when appropriate. If a conversation has too much irrelevant content, create a short summary or open a new conversation with the necessary context.

Instead of pasting an entire meeting transcript and asking for “everything important,” ask the AI to identify decisions, owners, deadlines and unresolved questions, then present them in a table. This reduces irrelevant input and clarifies the desired output.

Before pasting customer information, confidential contracts, personal data, source code, passwords, API keys or financial records into an AI tool, follow your organization’s policies. Tokenization doesn’t determine whether a provider logs requests or uses data to train models. Those are separate data-handling issues. See What not to share with AI for practical guidance.

The key things to remember about AI tokens

AI tokens are the pieces of text a language model processes. They aren’t necessarily words, don’t map one-to-one to characters and aren’t crypto assets.

Your request and supporting documents become input tokens; the response becomes output tokens. The total amount of text affects available context, response length and, where applicable, usage-based costs. Different models may count the same text differently because they use different tokenizers.

Provide clear, relevant context and ask for a response suited to the task. When you need precision, use the specific tokenizer or usage meter; don’t strip out useful context just to reduce the token count.

Frequently asked questions about AI tokens

What is tokenization?

Tokenization is the process of splitting text into tokens before a language model processes it. The pieces can be whole words, parts of words, punctuation marks or other strings of text (Decagon).

What are the main types of tokens in everyday AI use?

The two groups to know are input tokens and output tokens.

Group Meaning
Input tokens Text sent to the model, including the request and relevant context
Output tokens Text the model generates in its response

These two groups describe where tokens appear in an interaction, not two fundamentally different kinds of linguistic units.

How are AI tokens different from words?

Tokens and words sometimes coincide, but they aren’t equivalent. A common word may be a single token, while a long or uncommon word may be split into several tokens. Punctuation and formatting can also affect the count.

Are AI tokens the same as crypto tokens?

No. An AI token is a unit of text processed by a language model. A crypto token is a digital asset tied to a blockchain system. Sharing the word “token” doesn’t mean they’re technically related (Decagon).

For a fuller picture of this topic, you can also read What is generative AI and What are embeddings.

Was this article helpful?

Learn AI Mindset researches and fact-checks every article so you can understand and use AI well. If this one was useful, you can support us voluntarily so we can keep writing more like it.

Completely optional. Every article stays free to read whether or not you support us.

Support Learn AI Mindset on Ko-fi
Previous Article

How do LLMs work? How large language models predict the next word

Next Article

What is a context window? AI's context window explained simply