The unit AI models use to measure and price text. Roughly speaking, a token is a word-piece - about 0.75 English words on average. Both your inputs and Claude's outputs count against your token usage, and Claude Code usage is billed per token through your Anthropic account. Understanding tokens helps you estimate costs and manage your context window: a typical source file might be 500-2000 tokens, and a full repository might be hundreds of thousands.

A token is the small unit of text that language models read, generate, and bill in. It is usually a word-piece rather than a whole word - common words are often a single token, while longer or rarer words split into several. As a rough rule of thumb, one token is about 0.75 English words, so a thousand words lands somewhere around 1,300 tokens. Models do not see characters or words directly; they see sequences of tokens, which is why token counts, not word counts, are what actually matter.

Tokens are the basis for both cost and capacity. On cost: every Claude Code request bills for the tokens you send (input) plus the tokens Claude generates (output), charged through your Anthropic account, so a session that reads many large files and produces long responses costs more than a tightly scoped one. On capacity: the context window is measured in tokens, so the same counting determines how much Claude can consider at once. The two are linked - bloated context is both slower and more expensive.

A practical sense of scale helps you build economically. A typical source file is roughly 500 to 2,000 tokens; a long document or a big file can be several thousand; an entire repository can run into the hundreds of thousands. Knowing this, you can make better choices: open the files that matter instead of the whole tree, keep CLAUDE.md tight, and lean on subagents for heavy exploration. Spending tokens deliberately is how experienced builders keep Claude Code both fast and affordable.

Related terms

Put it to work

Learn it by building it

Definitions get you oriented. The club gets you shipping. Join Claude Code Club for $9/month.

Related: the full glossary, the learn hub, and our guides.