Skip to content
Core Concepts

What is Context Window?

Last updated May 2026

The maximum amount of text an AI model can process in a single conversation.

Definition

The context window is the total number of tokens an AI model can handle in a single request, including both the input prompt and the generated output. A larger context window allows the model to process longer documents, maintain longer conversations, and consider more information at once. Claude offers 200K tokens, while GPT-4o offers 128K.

💡 Example

With a 200K token context window, Claude can process approximately 150,000 words — roughly the length of two full novels. This allows it to analyze entire codebases or lengthy legal documents in a single conversation.

Related concepts

LLM (Large Language Model)

A type of AI trained on massive text datasets to understand and generate human language.

→
Prompt Engineering

The practice of crafting effective instructions to get better results from AI models.

→

Why this matters

Context window size determines how much text an AI can process at once. This matters for analyzing long documents, maintaining conversation history, and processing codebases. Larger context = more useful for complex tasks.

Real-world example

Claude offers 200K tokens (~150K words) — enough for entire books. ChatGPT's GPT-4o handles 128K tokens. Gemini 1.5 Pro supports up to 1M tokens. For simple Q&A, context size barely matters. For document analysis or long coding sessions, it's critical.

Token

The basic unit of text that AI models process — roughly 4 characters or 0.75 words.

→

Explore AI tools

Find tools that use context window in practice.

Browse all tools → Back to glossary
What is Context Window?

The context window is the total number of tokens an AI model can handle in a single request, including both the input prompt and the generated output. A larger context window allows the model to process longer documents, maintain longer conversations, and consider more information at once. Claude offers 200K tokens, while GPT-4o offers 128K.

How does Context Window work in practice?

With a 200K token context window, Claude can process approximately 150,000 words — roughly the length of two full novels. This allows it to analyze entire codebases or lengthy legal documents in a single conversation.

Why does context window size matter when choosing an AI tool?

The context window determines how much text the AI can process at once. A larger context window lets you analyze longer documents, maintain longer conversations, and provide more examples in your prompts. For tasks involving large codebases or lengthy reports, context window size is critical.

What happens when you exceed an AI model's context window?

When input exceeds the context window, the model either truncates the oldest content, returns an error, or uses techniques like summarization to compress earlier content. In chat interfaces, older messages silently drop out, which can cause the AI to lose important context from earlier in the conversation.

How do context window sizes compare across major AI models?

Context windows vary significantly across models. Some models offer windows as small as 4K tokens, while others support 100K tokens or more. Larger windows are useful for document analysis but may increase latency and cost per request.