AI Tools

LLM Context Windows Explained (and How to Check Yours)

Every model can only read so much at once. Learn what a context window is, how tokens count toward it, and how to check whether your prompt fits.

2 min read·Updated 2026-05-24

What is a context window?

A context window is the maximum amount of text a language model can consider at one time, measured in tokens. Everything counts toward it: the system prompt, the conversation so far, any documents you paste, and the reply the model is about to write. Exceed the window and the request fails or the oldest content is quietly dropped.

Why the limit exists

Transformers attend to every token relative to every other token, so cost and memory grow with the square of the input length. That is why windows are finite and why bigger windows cost more. Modern models range from a few thousand tokens to well over a million.

Typical context sizes

Model familyApproximate window
GPT-3.5 era16K tokens
GPT-4o / Llama 3.1128K tokens
Claude 3.5200K tokens
Gemini 1.5 Pro1M to 2M tokens

How to check your prompt

Because a token is roughly four English characters, you can estimate the size of any prompt by dividing its character count by four. The LLM Context Window Checker does this and shows the percentage of each model's window that your text would use, flagging anything that is too long.

Leave room for the answer

The reply shares the same window as your input. If you fill the window completely, the model has no space to respond. Budget the expected output length and keep your input comfortably below the limit.

When your text is too long

  1. Summarise or truncate the oldest messages.
  2. Retrieve only the most relevant passages instead of whole documents.
  3. Use a model with a larger window for the few requests that need it.
  4. Split the task into smaller steps.

Estimate the token count first, then price the tokens with the AI API Cost Calculator, because a bigger window usually means a higher price per token.

Tools used in this guide

Related guides