AI
What Are LLM Tokens? How AI Pricing Works
LLM tokens are the small chunks of text AI models read and write. Learn how tokens work, how they turn into words, and how token pricing sets your AI bill.
LLM tokens are the small pieces of text that large language models read and write. A model never sees whole sentences the way you do. It first chops your text into tokens, works with those, and produces its answer one token at a time. Tokens also decide two things you notice every day: how much text fits into a conversation, and how much an AI service costs to use.
This guide explains what a token is in plain language, how tokens relate to words, why input and output tokens are priced differently, and how to estimate and lower what you pay.
What Is a Token in AI?
If you've wondered what is a token in AI, the simplest answer is: a chunk of text, usually a few characters long. Common short words are often a single token. Longer or rarer words are split into several. Spaces, punctuation and numbers count too.
For example, a sentence like "Tokenization is surprisingly simple" might be split into pieces such as "Token", "ization", " is", " surprisingly", " simple". The exact split depends on the model, because every model family has its own tokenizer, the tool that turns text into tokens and back.
Why models use tokens instead of words
Models work with numbers, not letters. Each token in the tokenizer's vocabulary gets an ID number, and the model learns patterns between those numbers.
Using whole words would need an enormous vocabulary and would break on new words, typos and names. Using single letters would make every text very long and slow to process. Tokens sit in between: common words stay whole, and anything unusual is built from smaller parts. That way a model can handle any text, in any language, with a vocabulary of a manageable size.
Tokens to Words: A Rough Conversion
You can't convert tokens to words exactly, but for English text there is a reliable rule of thumb:
- 1 token ≈ 4 characters
- 1 token ≈ ¾ of a word
- 100 tokens ≈ 75 words
- 1,000 words ≈ 1,300 to 1,400 tokens
So a typical page of text is somewhere around 500 to 700 tokens, and a 300-page book can run to well over 100,000 tokens.
These numbers shift with the content:
- Other languages often need more tokens per word than English, especially languages with long compound words or non-Latin scripts. The same message can cost noticeably more in Turkish, German or Arabic than in English.
- Code and data such as JSON, tables and long numbers usually take more tokens than plain prose, because brackets, quotes and digits split into many small pieces.
- Different models count differently. The same text can produce a different token count on two providers.
If you need an exact count, most providers offer a tokenizer tool or a token-counting API.
Input and Output Tokens
Every request to a language model has two sides, and providers count and price them separately.
Input tokens are everything you send: the system instructions, your message, the earlier conversation, any files or documents you attach, and tool definitions if the model can use tools. Our guide to function calling explains how those tool descriptions travel with every request.
Output tokens are everything the model writes back.
Output tokens are almost always more expensive than input tokens, often several times more. Writing is harder work for the model than reading: it generates output one token at a time, and each new token needs a full pass through the model.
Reasoning tokens
Many newer models "think" before they answer. They write out internal reasoning steps that you may not see in full. Those reasoning tokens are usually billed as output tokens, so a short visible answer can still cost more than you expect.
The conversation adds up
In a chat, the model doesn't remember earlier messages on its own. Each time you send a message, the app sends the whole conversation again as input. A long chat therefore gets more expensive with every turn, even if your new message is short.
LLM Tokens and the Context Window
Tokens also measure how much a model can handle at once. A model's limit, called its context window, is the maximum number of tokens it can take in for one request, counting both your input and its answer. When a conversation grows beyond that limit, the oldest parts drop out of view.
Our guide on what a context window is explains what happens when it fills up and how to work within the limit.
How Token Pricing Works
Token pricing for AI APIs is almost always quoted per million tokens, with separate rates for input and output. The cost of one request is:
cost = (input tokens × input price) + (output tokens × output price)
A worked example
Imagine a model priced at $3 per million input tokens and $15 per million output tokens. These are example rates for illustration, not any specific provider's price list.
A customer support request sends 2,000 input tokens (instructions, the customer's message and a help article) and gets back a 400-token answer:
- Input: 2,000 × $3 ÷ 1,000,000 = $0.006
- Output: 400 × $15 ÷ 1,000,000 = $0.006
- Total: $0.012 per request
That looks tiny, but at 100,000 requests a month it becomes $1,200. Small changes in prompt length or answer length matter at scale.
What else changes the price
- Model size. Large, top-tier models cost many times more per token than small, fast ones.
- Cached input. Many providers charge much less for input they've seen recently, such as a long system prompt reused on every request.
- Batch processing. Jobs that don't need an instant answer can often run in a batch mode at a discount.
- Images, audio and files. These are converted into tokens too, often a lot of them.
Prices change often, so always check the provider's current pricing page before you plan a budget.
Subscriptions vs API Pricing
If you use a chat app on a monthly plan, you don't pay per token directly. You pay a flat fee, and the provider sets usage limits behind the scenes, often based on tokens. That's why long conversations with big files can hit a limit faster than many short chats.
Developers who call a model through an API pay for exactly the tokens they use. That makes costs predictable per request, but it also means a badly designed app, one that resends huge documents or lets answers run on, can get expensive quickly.
How to Use Fewer LLM Tokens
Whether you pay per token or work within plan limits, these habits help:
- Keep prompts focused. Send the parts of a document that matter, not the whole thing.
- Ask for short answers when you don't need long ones, and set a maximum output length in API calls.
- Start fresh chats for new topics instead of continuing one very long conversation.
- Summarize long sessions and continue from the summary.
- Use a smaller model for simple tasks like classification or extraction.
- Reuse fixed instructions so prompt caching can apply.
- Retrieve, don't paste. For large document collections, search for the relevant passages and send only those.
It also helps to know what tokens are underneath it all. Our explainer on what an LLM is shows how models predict text one token at a time, which is why output is the slow, expensive part.
FAQ
What is a token in an LLM?
A token is a small chunk of text, often a whole short word or part of a longer one, that a language model reads and writes. Models turn all text into tokens before processing it and generate their answers one token at a time.
How many words is 1,000 tokens?
In English, 1,000 tokens is roughly 750 words. The ratio varies with the language, the type of text and the model's tokenizer. Code and many non-English languages use more tokens per word.
Why are output tokens more expensive than input tokens?
The model can read input tokens all at once, but it has to generate output tokens one by one, with a full pass through the model for each new token. That takes more computing power, so providers charge more for output.
Do spaces and punctuation count as tokens?
Yes. Spaces are usually attached to the word that follows them, and punctuation marks often become their own tokens. Everything in the text, including line breaks, is part of the token count.
How can I count tokens before sending a request?
Most AI providers offer a tokenizer tool on their website or a token-counting endpoint in their API. For a quick estimate in English, divide the number of characters by four.