Tokens
Updated 2026-10-23
Questions this answers
- What's a token, and why does everything get measured in them?
- Why am I billed per token instead of per word?
- What does "context window" actually mean?
- Why does the AI forget things from earlier in a long chat?
- What's using up my context before I've even typed anything?
- Why did our team run out of credits halfway through the month?
The Fix
A token is the chunk of text a model reads and writes in. One token is about four characters of English, or three-quarters of a word, so "unbelievable" might split into un / believ / able. Everything you send and everything the model writes back is counted in tokens, and that count sets both the price and how much the model can hold at once.
Providers bill input and output tokens separately, and output costs more. On Anthropic's API in October 2026, Claude Sonnet 5.5 costs $2 per million input tokens and $10 per million output tokens. Plans with credits or usage limits count the same tokens, even when you see credits instead.
Every model also has a context window: the most tokens it can hold at once. Most current Claude models hold a million. Your message is a small part of what fills it. Before you type, the window already holds:
- The app's own instructions, which you never see.
- Your custom instructions, on every message.
- Each connected tool's description. Every connector adds a list of its tools and what they do.
- Each installed skill's name and description, about 100 tokens each. The rest of a skill loads only when it's used, through progressive disclosure.
- The whole conversation so far, including every file you attached.
As the window fills, answers get worse well before the hard limit. The model pays less attention to instructions from early in the chat, which is why a long conversation starts to forget what you told it at the start.
When to Use It
You don't need to count tokens by hand. These are the habits we teach for two problems trainees often bring to us.
When a long chat gets worse, start a new one. Ask the old chat for a short summary of what matters, decisions and constraints included, and paste that into the new chat. In Claude Code, /compact does this for you. Disconnect connectors and skills you aren't using, since each one takes up room in every message.
When a team runs out of credits, look at what runs on a schedule first.
The overruns we see mostly come from a daily task with no limits, like a
morning inbox summary that reads the whole inbox at the highest effort
level. Give the task a date window ("emails
from the last 24 hours"), a length ("five bullets at most") and a scope
("only customer threads"). Then check what one run costs before you
schedule it. In Claude Code, /cost shows what the session has spent.
High spend per person doesn't show who gets value from AI. Our post on how
to measure AI adoption ROI covers
what to track instead.
Best Practices
OpenAI Tokenizer
platform.openai.com
Paste in any text and watch it split into tokens.
Anthropic: Pricing
platform.claude.com
Input and output prices per million tokens for every Claude model.
Anthropic: Context windows
platform.claude.com
How the context window fills up over a conversation, and each model's size.