Same conversation across models
Window fill and cost per call for the inputs above.
| Model | Window | % used | Turns left | Cost / call |
|---|
Why the window fills faster than you think
A context window isn't just "how long a document can I paste." In a real chat app the model re-reads the entire conversation on every single turn, because the API is stateless — it has no memory between calls, so you resend the history each time. A 200-token system prompt plus ten turns of 250-token messages is already 2,800 tokens before the user has even typed their next question, and that whole block is sent again next turn. Add reserved space for the reply and you can see how a "small" chat creeps toward the limit, and why your bill climbs as a conversation gets longer.
This calculator separates the four pieces — system prompt, resent history, new message room, and reserved output — and shows the total against each model's window. The headline percentage tells you how much breathing room is left; "turns that still fit" tells you how long the conversation can run before you must trim or summarise older messages. Because output also lives inside the window, reserving 4,000 tokens for a long answer eats into the space available for context, which is why long-output tasks feel cramped even on big-window models.
Once you know it fits, price it. The LLM token cost calculator turns those tokens into a per-call cost on every model, the prompt caching calculator shows how much you save by caching that fixed system prompt instead of re-billing it, and the chatbot cost calculator ties it all to monthly volume.
How to use it
1. Pick a model — its context window loads automatically.
2. Enter your system prompt size, the average tokens per message, and how many past turns you keep in history.
3. Reserve tokens for the model's reply (longer answers need more).
4. Read the % used, the turns that still fit, and the cost — then compare models in the table.
Common mistakes
Forgetting output counts. The reply shares the window with the input; reserving a big max_tokens shrinks the context you can pass. Resending everything forever. Re-billing a growing history every turn is the main reason chat costs balloon — summarise or window the history. Trusting word counts. Tokens aren't words; code, JSON and non-English text use far more tokens per character. Confusing window with cost. A 1M window is free to have but expensive to fill on every call.
FAQ
What's the difference between context window and max output?
The window is the total budget for input + output combined. max_tokens only caps the output, and that output is carved out of the same window — so they trade off against each other.
How do I estimate tokens without a tokenizer?
Roughly 1 token ≈ 0.75 English words, or ~4 characters. For exact counts paste your text into the token counter. Code and non-English text run higher.
What happens when I exceed the window?
The API either rejects the request or silently truncates the oldest messages, depending on the provider and your setup. Either way the model loses the start of the conversation — trim or summarise before you hit the limit.
Does a bigger window make the model smarter?
No — it just holds more text. Models often attend less reliably to the middle of a very long context, so a focused, trimmed prompt frequently beats a stuffed one.
Estimate only. Token counts, context windows and prices are reference figures and vary by model and provider — verify before relying on them.