LLM Context Window Calculator
See what fits before a huge prompt fails or gets truncated.
Estimate your workload
Change the assumptions on the left; read the modeled result on the right.
How to read this estimate
What this calculator is for
Context is shared by system instructions, conversation history, documents, tool definitions and the model response. This calculator provides a quick heuristic before you use an exact tokenizer.
How to read the result
Read the estimated prompt tokens alongside reserved output tokens and remaining context. A positive remainder indicates the modeled request fits the context budget; it does not guarantee quality at very long lengths.
The math
Token fit compares your estimated prompt tokens plus reserved output tokens with the selected model’s context capacity.
Pricing sources
Rates use the published TokenCOGS pricing registry and its September 16, 2026 fallback snapshot. Live values may differ; see methodology and source limitations before procurement.
Planning limitations
Actual invoices can differ because providers may apply long-context pricing, caching rules, batch rates, tool-call fees, regional processing, negotiated contracts, taxes, or future pricing changes. Treat the output as a planning estimate.
Use it to create scenarios and catch order-of-magnitude mistakes. Before committing spend, verify the selected model's live provider pricing and compare the estimate with actual usage telemetry.
Does a request that fits the context window always perform well?
No. Context capacity is a technical limit, not a quality guarantee. Long prompts may still affect latency and output quality.
Is this an exact token counter?
No. It is a browser-side heuristic. Tokenization varies by model and language; use a provider tokenizer for billing-grade counts.