When you interact with an AI like ChatGPT, you might think in words and sentences — but the model doesn’t. Instead, it breaks everything down into tokens. Understanding tokens helps you better control how LLMs work, how much they cost to use, and why some responses get cut off.

What is a Token?

A token is a small piece of text: it can be a word, part of a word, or even punctuation. For example:

  • “ChatGPT” → might be 1 token
  • “internationalization” → could be broken into 5–6 tokens
  • “.” → is 1 token

Most models, like GPT-4, use subword tokenization, meaning long words are split into manageable parts. A typical English sentence of 20 words is usually around 30–40 tokens.

Why Tokens Matter

Tokens affect:

  • Performance: Concise prompts help the model focus; too much text can reduce relevance or quality.
  • Cost: You’re usually billed per 1,000 tokens (input + output).
  • Length limits: Models have a token limit (e.g., GPT-4 Turbo allows up to 128,000 tokens). Long prompts or conversations may get cut off.

Real Example

Prompt: “Write a short story about a cat who becomes mayor.”
→ May use ~50 input tokens
→ Output: ~200 tokens
Total: ~250 tokens = 0.00075 USD (depending on the model)

Tokens are the building blocks of how AI reads and writes. Understanding them helps you write better prompts, control costs, and manage the limitations of large language models.

🌍 Curious how large language models like GPT understand and switch between languages?

In our next article, we’ll explore how LLMs are trained on multilingual data, what that means for translation, and why bias still matters.

👉 Read next: How Do LLMs Learn and Handle Multiple Languages?

Curious about the energy and cost behind each article? Here’s a quick look at the AI resources used to generate this post.

🔍 Token Usage

Prompt + Completion: 3,000 tokens
Estimated Cost: $0.0060
Carbon Footprint: ~14g CO₂e (equivalent to charging a smartphone for 2.8 hours)
Post-editing: Reviewed and refined using Grammarly for clarity and accuracy

Tokens are pieces of text AI reads or writes. More tokens = more compute power = higher cost and environmental impact.