The context window is the maximum amount of text (measured in tokens) that an AI language model can process in a single interaction, including both the input prompt and the generated output. Larger context windows allow models to handle longer documents, maintain conversation history, and process more information at once. Context window sizes have grown dramatically: GPT-3 supported 4K tokens, while models in 2026 support up to 2M tokens (Gemini) and 1M tokens (Claude). Larger contexts enable use cases like full codebase analysis, book-length document processing, and extended conversations. However, model performance can degrade with very long contexts ("lost in the middle" phenomenon).
Frequently Asked Questions
What is a context window?
The context window is the maximum number of tokens an AI model can process at once, including your input and the model response. Larger windows allow processing more information.
How big are modern context windows?
As of 2026, leading models offer context windows from 128K to 2M tokens. Gemini supports 2M, Claude supports 1M, and GPT-5 supports 256K tokens.