# Context Length

- **Canonical URL:** https://getaimath.com/dictionary/context-length/
- **Topics:** [LLM Fundamentals](https://getaimath.com/dictionary/category/llm-fundamentals/), [Context, Memory & Retrieval](https://getaimath.com/dictionary/category/context-memory-and-retrieval/)
- **Last updated:** 2026-11-25

## What is Context Length?

**In one sentence:** Context length is the number of tokens a model can handle at once, or how many tokens are currently being used.

People often use it to mean the same thing as context window size. Sometimes it means how much of the window a particular conversation is using right now. Longer context lets the model work with bigger documents, but it uses more memory and can be slower and more expensive.

![How ChatGPT & Claude Talk: Super-Powered Autocomplete — Simple cartoon diagram showing a sentence chopped into Lego word blocks (tokens), an AI brain weighing the odds of the next word ("mat" 75%, "couch" 18%, "roof" 5%), and snapping "mat" onto the end of the sentence.](https://getaimath.com/diagrams/llm-fundamentals.png)
*Napkin Diagram (LLM Fundamentals): Language models don’t plan whole essays at once—they play a super-smart game of "guess the very next word" over and over.*

## What is an example of Context Length?

A model might support a context length of 128,000 tokens, while your current chat uses only 3,000.

## Why does Context Length matter?

Context length affects what tasks a model can handle, like reading a whole codebase or a long contract.

## Related Concepts

- [Context Window](https://getaimath.com/dictionary/context-window/): The context window is the maximum amount of text, measured in tokens, that a model can look at in one go.
- [Input Tokens](https://getaimath.com/dictionary/input-tokens/): Input tokens are the tokens you send to a model, including your prompt, instructions and any documents.
- [Context Overflow](https://getaimath.com/dictionary/context-overflow/): Context overflow is what happens when there is more text than fits in a model's context window.
- [Context](https://getaimath.com/dictionary/context/): Context is all the information an AI model can see when it answers, such as your message, earlier messages and any documents you give it.
- [Output Tokens](https://getaimath.com/dictionary/output-tokens/): Output tokens are the tokens the model generates in its reply.
- [Context Management](https://getaimath.com/dictionary/context-management/): Context management is deciding what information goes into a model's limited context window, and what stays out.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/context-length/)
