# Context Window

- **Canonical URL:** https://getaimath.com/dictionary/context-window/
- **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 Window?

**In one sentence:** The context window is the maximum amount of text, measured in tokens, that a model can look at in one go.

Think of it as the model's desk. Everything it needs, your question, the conversation, and any documents, must fit on the desk. If there is too much, older parts fall off or must be removed. Some models have small desks of a few thousand tokens; others can hold over a million.

![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.*

### Quick Math / Rule of Thumb

128K tokens ≈ ~96,000 English words (~300 book pages); 1M tokens ≈ ~750,000 words (~7–8 full novels).

## What is an example of Context Window?

A model with a 200,000-token context window can read roughly a 500-page book at once.

## Why does Context Window matter?

The context window limits how much you can give the model and how long a conversation can go before it forgets.

## Context Window vs. Agent Memory

The context window is temporary working RAM for the current conversation turn, whereas agent memory persists facts, preferences, and past episodes across sessions in external storage.

| Dimension | Context Window | [Agent Memory](https://getaimath.com/dictionary/agent-memory/) |
| --- | --- | --- |
| Lifespan | Cleared when you start a new chat | Persists across days, sessions, and tasks |
| Capacity | Bounded (e.g., 128K–1M tokens) and billed per turn | Practically unlimited in a database or files |
| Human analogy | What you hold in short-term attention right now | Your notebook and long-term memory |

## Related Concepts

- [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.
- [Context Length](https://getaimath.com/dictionary/context-length/): Context length is the number of tokens a model can handle at once, or how many tokens are currently being used.
- [Latent Space](https://getaimath.com/dictionary/latent-space/): Latent space is the hidden map inside a model where every input is placed as a point based on its meaning or features.
- [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.
- [Semantic Representation](https://getaimath.com/dictionary/semantic-representation/): A semantic representation is a way of storing the meaning of text or data so a computer can work with it.

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