Context Token Budget
Reserve output space and calculate remaining input capacity.
Your numbers
Remaining input budget
Use the actual tokenizer and provider limits. Context windows, output caps, hidden overhead and prices are not fetched or verified here.
Scenario comparison
Up to three snapshots in this tab. Loading one replaces the current inputs.
Formula
Use A = W−S−H−O. W is context capacity, S is system and tool tokens, H is existing history, O is reserved output, and A is remaining input capacity. All terms are token counts.
Reserve output space and calculate remaining input capacity.
Worked example
- Model context window (tokens)
- 32000
- System and tool tokens
- 2000
- Existing history tokens
- 10000
- Reserved output tokens
- 4000
- Tokens per new document chunk
- 2000
- Remaining input budget
- 16,000 tokens
- Whole new chunks that fit
- 8
- Over budget
- 0 tokens
Scope and limitations
Use the actual tokenizer and provider limits. Context windows, output caps, hidden overhead and prices are not fetched or verified here.
Inputs are checked for missing values and allowed ranges. A result outside the finite numeric range is not displayed. Rounding affects display, while the calculation uses the model’s numeric precision.
Check your units and assumptions before relying on a result. Changing a label does not convert a currency or physical unit.
Formula version: 3863a060f33a · Example checked: