Context window calculator

Enter token counts for each part of your request and reserve room for generated output. Compare the total with a dated API model preset or your own limits.

Inputs
tokens
Enter token counts, not words or characters. Do not count the same tokens in two fields.
tokens
Enter token counts, not words or characters. Do not count the same tokens in two fields.
tokens
Enter token counts, not words or characters. Do not count the same tokens in two fields.
tokens
Enter token counts, not words or characters. Do not count the same tokens in two fields.
tokens
Enter token counts, not words or characters. Do not count the same tokens in two fields.
tokens
Enter measured formatting or other input tokens not already included. Zero is an example, not a claim of no overhead.
The combined field starts at 25,000; switching modes preserves your edits.
tokens
tokens
Add non-visible generated tokens here. Use zero when not applicable to your model or already included in output reserve.
tokens
Your optional planning allowance; not a provider rule.

Results

Context budget check
Fits the entered budget
Total reserved tokens
110,000
Context headroom
940,000
Output-limit overage
0
Token budget by component
ComponentTokensShare of context window
Instructions1,0000.1%
Tool schemas2,0000.19%
Documents and retrieved content80,0007.62%
Conversation history10,0000.95%
Current user message1,0000.1%
Other request / formatting tokens00%
Visible output reserve8,0000.76%
Reasoning / other generated reserve8,0000.76%
Safety margin00%
  • Context window: 1,050,000; maximum generated output: 128,000. Presets checked 2026-11-14; review due 2027-02-12.
  • Fit is conditional on your counts and reserves. No tokenizer or API request runs here. Use an exact whole-request count when possible; include formatting and tool schemas.
  • This checks API token capacity, not model quality, rate limits, subscription limits or cost. Budget your configured output allowance when checking full request capacity.

Results update as you type. The share link stores your inputs after the # in the address, which is not sent to our server, but anyone you send it to can read them.

How it works

Add input components without overlap, then reserve space for visible output, reasoning or other generated tokens, and an optional safety margin. OpenAI’s conversation-state guide defines the context window as input plus output and reasoning. The generated reserve must also respect the model’s separate output limit.

input = instructions + schemas + documents + history + message + formatting
generated reserve = combined reserve OR (visible output + reasoning / other generated reserve)
required = input + generated reserve + safety margin
fits = required ≤ context window AND generated reserve ≤ output limit

Choose separate reserves or the editable reasoning-model starting preset. OpenAI recommends at least 25,000 tokens for reasoning and outputs when starting experiments. The combined field starts at 25,000 and includes all generated tokens; the hidden split fields are ignored. This is an initial planning recommendation, not typical consumption or a guaranteed sufficient allowance. Adjust it using measured usage and your model’s output limit.

Presets checked November 14, 2026: GPT-6.1 Sol’s API window is 1,050,000 tokens with 128,000 maximum output; legacy GPT-4o has 128,000 and 16,384 respectively. These are API limits, not subscription allowances.

No tokenizer is bundled. The token-counting guide explains that full requests include formatting and schema tokens that plain-text tokenization can miss. If you have an exact request total, enter it in one input component and set the other input components to zero. Keep generated reserves separate. A safety margin is your planning choice, not a documented overhead constant.

Rounding: token arithmetic uses whole counts without intermediate rounding; displayed component percentages use up to two decimals. A fit result is conditional on the entered counts and allowances, not a guarantee that every endpoint will accept a request.

Worked examples

A 108,000-token budget in a legacy window

Use the GPT-4o preset and separate reserves: instructions 1,000, schemas 2,000, documents 80,000, history 10,000, current message 1,000, formatting 0, visible output 14,000, reasoning reserve 0 and margin 0. Input is 94,000; the total is 108,000, leaving 20,000 tokens. The 14,000 generated reserve is below the 16,384 output limit, so it fits.

Output can fail even with ample context space

With the GPT-4o preset and separate reserves, enter 1,000 instructions, zero other input components, 17,000 visible output, zero reasoning and zero margin. Total is only 18,000, leaving 110,000 context tokens, but output exceeds the separate limit by 616. The budget does not fit.

Frequently asked questions

Can I paste a document instead of counting tokens?
This tool accepts counts only. Use your model’s tokenizer or whole-request token-counting facility first. Character counts are not reliable token counts for every language, schema or file.
Do tool schemas consume context?
Yes. Include schema and description tokens, plus formatting not already counted elsewhere. Tool results retained in the conversation belong in history or retrieved content, but not both.
Is output reserve the same as maximum output?
The reserve is your planned allowance. The maximum is the model’s limit. To budget for a request reaching its configured output allowance, enter that allowance instead of an average response length.
Does an exact fit count as fitting?
Yes: equality satisfies the arithmetic checks. It leaves no spare room for omitted tokens. Add a safety margin if your counts are estimates.
Does a larger context window guarantee good answers?
No. This checks capacity only. It does not measure retrieval quality, attention to every document, latency or cost.

Sources

Last reviewed 2026-11-14; next review due by 2027-02-12. The method is written out above so you can check our math.