InputTestHub

Context Window Planner

Works out how many conversation turns fit in a context window once the system prompt, tools and documents are counted.

Developer Nothing uploaded No sign-up Free, unlimited
Developer tool
Leave at 0 to use the preset.
Enter your figures and press Calculate.
In short A context window is not a conversation budget — the fixed overhead comes out of it first and is resent on every single call. A 4,000-token system prompt, 2,000 tokens of tool definitions and a retrieved document can consume a third of a 200,000-token window before the first message is exchanged, and that share is paid again on every turn. It is also why a larger window buys fewer extra turns than it looks: the overhead scales with nothing. The other constraint is that the whole history is resent each time, so cost grows with the square of the conversation length even though the window fills linearly.

How to use the Context Window Planner

  1. Pick a model, or type your own window size.
  2. Enter your system prompt, tools and retrieved context.
  3. Read how many turns are left, and the comparison across models.

About the Context Window Planner

The Context Window Planner works out how many conversation turns fit in a context window once the system prompt, tools and documents are counted. It runs as plain JavaScript inside the page, which means there is no upload step, no queue and no size limit imposed by a server — the only limit is your own device.

What people use it for

  • Deciding how much retrieved context a chatbot can afford.
  • Working out when to start summarising a conversation.
  • Comparing what a larger window would actually buy.

Details

OverheadResent on every call, not just the first
Reply spaceMust be reserved — output shares the window on most models
Cost growthQuadratic with conversation length, not linear
Biggest leverRetrieving less, and better

The maths behind it

This tool uses turns = (window × (1 − margin) − system − tools − documents − reply) ÷ average turn size. Every intermediate value is shown on screen, so the result can be checked by hand.

The number worth watching is the percentage of the window gone before turn one. Above about 40% the conversation is short whatever the window size, and the fix is always the same: retrieve less, and cache what repeats.

Where this tool stops

Counts tokens. It cannot model the accuracy falloff across a long context, which is real, well documented and not visible in any token count.

Frequently asked questions

Why does a bigger context window help less than I expected?
Because the fixed overhead does not shrink. If a third of a 200,000-token window is system prompt, tools and documents, moving to a million-token window does not make that overhead smaller — it just makes it a smaller fraction, while you still pay for it on every call. Cutting the overhead helps every model; a bigger window only helps the long tail.
Should I just fill the window with context?
No. Retrieval quality falls off in the middle of a long context — a fact placed at position 80,000 is measurably less likely to be used than the same fact at position 2,000. Fetching three relevant passages beats fetching thirty, on both cost and accuracy, and this is one of the few areas where less genuinely works better.
Why reserve space for the reply?
Because on most models the output shares the same window as the input. A prompt that fills 195,000 of a 200,000-token window leaves room for a very short answer and then stops mid-sentence — which looks like the model failing rather than the budget running out.
Do I need an account to use the Context Window Planner?
No charge and no sign-up. There is no free tier to run out of because there is no paid tier — inputtesthub.com is funded by advertising rather than by metering the utility.
Is the Context Window Planner safe to use with private information?
No. The Context Window Planner runs entirely in your browser using JavaScript. Nothing is transmitted, logged or stored, which you can verify yourself in the Network tab of your browser's developer tools.
Can I check the maths myself?
It uses turns = (window × (1 − margin) − system − tools − documents − reply) ÷ average turn size. The full working is printed under the result, so you can follow every step rather than trusting a black box.
What is the Context Window Planner used for?
In practice it gets used for three things: deciding how much retrieved context a chatbot can afford. Working out when to start summarising a conversation. Comparing what a larger window would actually buy. It is built for exactly those cases rather than being a general-purpose tool with this bolted on.
What are the limits of the Context Window Planner?
Counts tokens. It cannot model the accuracy falloff across a long context, which is real, well documented and not visible in any token count. Knowing where a tool stops being trustworthy matters more than the cases where it works.
What are the reference figures here?
Overhead is Resent on every call, not just the first. Reply space is Must be reserved — output shares the window on most models. Cost growth is Quadratic with conversation length, not linear. These are printed on the page itself, so you do not have to take them on trust.
Can I rely on this for exact work?
The calculation runs in double precision and the result is shown to ten significant figures, so converting a value and converting it back returns the original. What is displayed is rounded for readability; what is copied is not.

Related developer tools

All 92
01

Unix Timestamp Converter

Converts Unix epoch timestamps to human-readable dates in any time zone, and dates back to…

02

Subnet Calculator

Calculates network address, broadcast, usable host range, wildcard mask and host count from an…

03

IP Address Converter

Converts IPv4 addresses between dotted decimal, integer, binary and hexadecimal notation.

07

LLM API Cost Calculator

Works out what an LLM feature costs per call, month and year, including what prompt caching…

08

Embedding Cost Estimator

Estimates what embedding a corpus costs, how many chunks it produces, and how much vector…

09

JSON Formatter

Formats, indents and validates JSON with precise error positions, key sorting and a…

10

JSON Validator

Checks whether JSON is valid and reports the exact line, column and reason for the first error…