Context window planner

Plan how instructions, chat history, documents and the reply share a model's context window, and see right away if something will not fit.

Sets the context window and the longest reply allowed.
tokens
tokens
tokens
tokens
tokens
  • Instructions
  • History
  • Prompt and files
  • Reply
–of the window used
–tokens planned
–tokens to spare
–longest reply this model allows

Prices for 65 models, updated 24 October 2026. What changed

How to use it

  1. Choose a model. Its context window and maximum reply length fill in for you.
  2. Enter roughly how many tokens each part of your request uses. Use the token counter if you are not sure.
  3. Check the bar and the remaining space. Red means the request is over the limit.

What the context window is

The context window is the total number of tokens a model can consider in one request. Everything counts against it: the system instructions, every earlier message you send back for memory, any documents or search results you attach, tool definitions, and the reply the model writes. Once the total reaches the limit, the request either fails or the oldest content has to be dropped.

The four parts of a request

  • System instructions. The standing rules for the assistant: tone, role, policies, formatting. These go out with every call.
  • Conversation history. Chat apps resend earlier turns so the model remembers them. This is usually the part that grows fastest.
  • New prompt and files. The current question plus anything attached to it, such as a contract, a spreadsheet export or retrieved web pages.
  • Reserved output. The space you set aside for the answer, usually with a parameter called max_tokens or max_output_tokens.

Worked example

Say you run a property-listing assistant on a model with a 200,000-token window. The system prompt is 2,500 tokens, you keep the last 20 turns of chat (about 12,000 tokens), and each question attaches three brochures totalling 45,000 tokens. Reserving 8,000 tokens for the answer brings the total to 67,500, about 34 percent of the window. That fits comfortably. Attach ten brochures instead and you reach roughly 170,000 tokens, which still fits but leaves little margin and costs nearly three times as much per question.

Context limit and output limit are different

Many models can read far more than they can write. A model may accept a million tokens of input but cap a single reply at 64,000 or 128,000 tokens. This planner shows both numbers and warns you if your reserved output is larger than the model allows.

When you run short of space

Summarise older chat turns into a short running memory. Send only the relevant sections of long documents, chosen by search, instead of whole files. Move rarely needed rules out of the system prompt. Or switch to a model with a larger window, using the price comparison to see what that does to your bill.

Questions

Does the reply count toward the context window?

Yes, for nearly all current models. Input tokens and output tokens share the same window, which is why you need to reserve space for the answer.

Do reasoning models use extra space?

Yes. Models that think before answering generate reasoning tokens that count as output, and in most APIs they come out of the same output budget. Reserve more output room for them than for a standard model.

Is the model's context size always accurate?

Context sizes come from the same weekly-updated public list as prices. Some providers offer larger windows only on certain plans or at higher prices, so confirm in the provider's documentation.

What happens if I go over the limit?

Most APIs reject the request with an error. Some chat apps silently drop the oldest messages instead, which can make the assistant forget earlier instructions.