LLM Context Window Calculator
Plan how a prompt fits a model’s context window — system prompt, history, RAG chunks, tools and output in a budget bar, with cost per request and month.
Loading tool controls…
Verify it yourself: press F12, open the Network tab, and use this tool — your files are never uploaded.
LLM Context Window Calculator at a glance
- Price
- Free
- Account
- Not required
- File uploads
- None — your files are never uploaded
- Category
- Developer Tools
Who uses Developer Tools?
Developers and engineers formatting JSON, testing regex, hashing data, encoding values or building API requests.
How to Use LLM Context Window Calculator
Follow these simple steps to get instant results in your browser.
Pick a Model
Choose the model you will call — the page shows its context window and its input/output price per 1M tokens.
Fill In the Five Segments
Paste the system prompt, then set history turns and tokens per turn, RAG chunks and tokens per chunk, tool-definition tokens and reserved output tokens.
Read the Bar and the Cost
Check the segmented budget bar for the window share, then read the cost per request and the monthly projection for your request volume.
What is LLM Context Window Calculator & How Does It Work?
LLM Context Window Calculator plans how a prompt fits inside a model's context window before you send it. Pick a model — GPT-5, GPT-5 mini, GPT-4o, Claude Sonnet 4.5, Opus 4.1, Haiku 4.5, Gemini 2.5 Pro and Flash, Llama 4 Scout or DeepSeek V3.2 and R1 — then fill in the five parts of a request: the system prompt, the conversation history, the retrieved RAG chunks, the tool definitions, and the tokens reserved for the reply. A segmented budget bar shows each part's share of the window, and the page shows the cost per request and per month.
Context windows grew fast in 2026: GPT-5 and the Claude 4 family offer 200k–400k tokens, Gemini 2.5 Pro passes 1M, and Llama 4 Scout reaches 10M. But a big window is not a free pass — long prompts cost more, slow the model down, and the model pays less attention to the middle of a very long context. Budgeting the window first is how agent loops and RAG pipelines stay fast and affordable.
Token counts from pasted text are heuristic estimates (~4 characters per token) and prices are public list prices as of 18 Nov 2026, labelled on the page as estimates, never billing records. Providers reprice quarterly, so check the provider's pricing page before budgeting. Use the LLM Token Counter for exact GPT token counts.
Key Features & Capabilities
11 Models, 2026 Limits
GPT-5, Claude 4, Gemini 2.5, Llama 4 Scout and DeepSeek with their current context windows.
Segmented Budget Bar
System prompt, history, RAG chunks, tools and reserved output shown as coloured shares of the window.
Cost Per Request and Month
Input + output pricing per request, scaled to your daily request volume over 30 days.
Over-Limit Warning
Plans that exceed the window are flagged with the exact overflow in tokens.
Dated Pricing Table
Every model's list price shown with a visible 'prices as of 18 Nov 2026' date.
Pro Tips
- •Bookmark this tool for instant one-click access anytime.
- •Drag and drop files directly onto the input surface for fastest handling.
- •All processing happens in your browser session for maximum speed and data safety.
🎯 Common Use Cases
LLM Context Window Calculator - Budget and Cost
Input tokens are everything sent to the model (system prompt, history, RAG chunks, tool definitions); output tokens are the reply you reserve room for. The used percentage is total tokens ÷ context window × 100. Pasted text is estimated at ~4 characters per token.
Worked Example
- 112,000 input tokens and 1,500 output tokens on GPT-5 ($1.25 in / $10.00 out per 1M)
- 2Cost per request = (12,000 ÷ 1,000,000 × $1.25) + (1,500 ÷ 1,000,000 × $10.00) = $0.015 + $0.015 = $0.0300
- 3At 200 requests a day, monthly cost = $0.0300 × 200 × 30 = $180.00
Sources & Further Reading
- OpenAI API Pricing — OpenAI
- Anthropic API Pricing — Anthropic
- Gemini API Pricing — Google
Frequently Asked Questions about LLM Context Window Calculator
Frequently asked questions
More Developer Tools
Complementary utilities for your workflow
LLM Context Window Calculator
Plan a prompt’s fit in a model’s context window, with cost.