A token is the smallest unit an AI model uses to read and write text, and the context window is the amount of tokens a model can refer to at once. The longer the material you put in, the more of this space it takes up, and API pricing is also charged by the number of tokens exchanged. In this post, I compare explanations from Anthropic, OpenAI, and Google to cover what tokens and context windows mean, what changes when you put in long material, and how pricing is structured.
When you read AI model announcements, phrases like "1-million-token context window" or "X dollars per million tokens" always come up. Have you ever wondered why they use a unit called tokens instead of characters or words, and what those numbers actually mean? As I studied this while using AI at work, I found that once I understood these two concepts, it became much clearer what to watch out for when putting in long reports and where costs go up. In this post, I'll go through these basic concepts step by step.
1. What is a token?
Anthropic's glossary describes tokens as the smallest units a language model works with, and notes that a token can be a word, part of a word, or a single character. Because the sentences we type are converted into a sequence of these tokens inside the model before being processed, from the model's point of view the token count, rather than the character count, is what matters.
Here are the rough conversion guidelines from the official documentation.
| Source | Rough guideline |
|---|---|
| Anthropic | In Claude, one token is about 3.5 English characters, and this varies by language |
| In Gemini, one token is about 4 characters, and 100 tokens are roughly 60 to 80 English words |
The Gemini token documentation explains that short words can become a single token on their own, while long words get split into several tokens. What's worth noting is that both guidelines are based on English. The official documentation I looked at doesn't give a separate conversion ratio for Korean, so for Korean material it's more accurate to count directly with the token counting features I'll introduce later.
It's also good to know that the same text can have a different token count depending on the model. In its pricing documentation, Anthropic notes that the new tokenizer (the way text is split into tokens) used starting with Claude Opus 4.7 splits the same text into about 30% more tokens than the previous one. It says the degree of increase varies with the content, so if you've switched models, it's a good idea to count tokens again.
2. What is a context window?
Anthropic's context windows documentation describes the context window as all the text the model can refer to when generating a response, including the response the model itself generates. It's a different concept from the vast data the model was trained on, and is described as the model's "working memory."
A desk analogy makes it easy to understand. If the knowledge the model learned is the whole library, the context window is the space on the desk you're working at right now. The instructions, attached documents, the conversation so far, and even the new response the model writes all have to fit on this desk, and once the desk is full, you can't put anything more on it.
The same documentation summarizes what goes into the context window like this.
- System prompt: Basic instructions given to the model in advance
- Conversation history: All previous questions and answers, including attached documents and images
- Tool definitions and results: Descriptions of the tools the model uses and their execution results
- New response: The output the model generates this time
As of September 25, 2026, Anthropic's documentation lists 1 million tokens for Claude Opus 5.5, Sonnet 5, and others, and 200,000 tokens for other models such as Claude Sonnet 4.5. The Gemini long context documentation also says many Gemini models have context windows of 1 million tokens or more.
3. What changes when you put in long material?
So if the context window is large, is it better to put in as much material as possible? Anthropic's documentation actually points out that more context isn't automatically better. It explains that as the token count grows, accuracy and recall can degrade, a phenomenon it calls context rot. That's why choosing what to put in matters as much as how much you can put in.
The Gemini documentation notes similar limitations. It says performance is high on tests that look for a single piece of information in long material, but when there are several pieces of information to find, the same accuracy isn't achieved, and that the longer the input, the longer it generally takes to get the first response.
There are also methods both companies' documentation recommends.
- Long material first, question at the very end: Anthropic says that when working with long material over 20,000 tokens, putting documents at the top of the prompt and the question at the end improved response quality by up to 30% in tests, especially for complex inputs with multiple documents, and the Gemini documentation also says it's generally better to put the question at the end with long contexts.
- Have it quote the relevant parts first: Anthropic advises that for long-document tasks, asking the model to quote the relevant parts first and then do the task helps it be less distracted by the rest of the content.
For reference, Anthropic's documentation also explains that chat interfaces like claude.ai may manage context by pushing out older content first. If a conversation has gotten very long, I think it's safer to restate important conditions rather than expecting the instructions you gave at the start to still be there.
4. Why is pricing charged per token?
Anthropic's and OpenAI's developer API price lists are shown as prices per million tokens, with input you put into the model and output the model generates priced separately. For example, according to Anthropic's pricing documentation as checked on September 25, 2026, Claude Sonnet 5 costs $2 per million input tokens and $10 per million output tokens. Output being priced higher than input is something you can see in both OpenAI's and Anthropic's price lists.
What's easy to miss here is how conversations accumulate. According to Anthropic's documentation, each turn's input includes the entire previous conversation history along with the new message. Because the input tokens sent each time grow as the conversation gets longer, asking the same question at the end of a long conversation can cost more.
Pricing policies for long context differ by company. Anthropic states that for Claude 4.6 and later models, the full 1 million tokens are charged at standard pricing, while OpenAI's price list has separate short-context and long-context prices for some models. Prices change often, so please check each company's pricing page again before actually using them.
If you want to estimate costs in advance, you can use token counting features. Anthropic, OpenAI, and Google all provide a way to count input tokens before sending a request.
Summary
Tokens are the unit AI uses to handle text, the context window is the size of the desk you can lay things out on at once, and API pricing is charged by the number of tokens that pass across it. Rather than putting all your material on the desk at once just because it got bigger, the method the official documentation commonly recommends is to pick the material you need, put it first, and put the question at the end. Please keep these guidelines in mind when handing long reports or data to AI.
FAQ
- How many characters is one token?
- It depends on the model and language. Anthropic says one token in Claude is about 3.5 English characters, and Google says it's about 4 characters in Gemini. The official documentation doesn't give a separate ratio for Korean, so it's more accurate to count directly with a token counting feature.
- Is a bigger context window always better?
- It has the advantage of handling longer material at once, but Anthropic's documentation explains that accuracy and recall can degrade as tokens increase. Choosing the material you need to put in is still important.
- Why do costs go up as a conversation gets longer?
- According to Anthropic's documentation, by default in the API, the entire previous conversation history is sent as input along with each turn. As the conversation builds up, more input tokens are sent each time, and you're charged for those input tokens.
Related posts
- Chatbots vs. AI agents vs. automation - How to pick the right AI approach for the job
- Claude Marketplace launch: how connectors, skills, and plugins differ - How to connect external tools and data to AI
- Building a personal blog with vibe coding - How I built a blog myself with AI tools
