Tokens, cost and context

Context Window Checker

Answers one question: does this fit? Paste a system prompt, a conversation history and the reply length you expect, pick a model, and see how much of the context window you have used and what is left for the answer.

How the estimate is calculated

Each section's tokens are estimated as charCount ÷ 4 — the same rule of thumb the pricing tools use. The number is an estimate, not a measurement; for an exact count use the Token Counter. The bar is drawn as percentages, so a 1M-token model and a 4k model render the same way.

0tokens used
0%of window
—tokens left for the reply
System History User message Reply reserve Free

Paste text to see the verdict.

Sections, largest first

When the prompt does not fit, the largest section is the one to cut. This table sorts by token count so the choice is obvious.

SectionCharsTokens (est.)

How to use the Context Window Checker

Paste the system prompt, the history and the current user message, and pick a model. The bar at the top shows how the four pieces of the prompt stack against the model’s window, with the reply reserve shown in green. The cells above the bar report the total used, the percent of the window, and how many tokens are left for the answer.

The bar is drawn as percentages, so a 1M-token model and a 4k model render the same way. The verdict line names what the situation is: fits with room, fits but the reply may be cut, or over the limit with a specific overage.

How is the token count estimated?

Each section is counted as charCount ÷ 4, the same rule of thumb the pricing tools use. The number is an estimate, not a measurement; for an exact count, use the Token Counter on the relevant section.

What if my reply reserve is bigger than the window?

The tool says so explicitly, instead of drawing a negative bar. A 1000-token reserve against a 4k model with 3.5k of input leaves nothing for the answer; the verdict line flags it.

What if the verdict says it fits but the model still cuts the reply?

There are a few reasons that can happen: tool calls and structured output are not counted in the prompt but consume the reply; the model rounds to its own nearest context length; system instructions and the rendered prompt can differ. The verdict is a planning aid, not a guarantee.