Chatbot Context Growth Calculator
A chat request usually sends the system prompt plus the earlier turns, not only the newest message. Cost grows with the square of the conversation if you never trim history.
A chat request usually sends the system prompt plus the earlier turns, not only the newest message. Cost grows with the square of the conversation if you never trim history.
Sample rates are planning examples, not official prices. Confirm the current price on the provider’s pricing page. This page is not affiliated with OpenAI, Anthropic, Google, or DeepSeek, and it is not financial advice.
How to use the Chatbot Context Growth Calculator
- Enter system-prompt tokens, a typical user message, and a typical assistant reply.
- Set how many turns to simulate, from 1 to 50.
- Choose a model rate.
- Read the table for turns 1, 5, 10, 25, and 50, plus the cost of the whole session.
How token math works
Providers bill input tokens and output tokens separately, usually per 1 million tokens. This suite estimates English prose at 1 token per 4 characters (about 0.75 words per token), code and JSON at 1 token per 3 characters, and multilingual text at 1 token per 2 characters. Dollar figures use the rate you select. They update in the browser and are not a quote from a model provider.
Practical notes
- Turn k sends the system prompt, k user messages, and k−1 earlier replies. The new reply is output, not input, on that turn.
- Trim or summarize history when the input on a late turn is many times the newest message.
- Next: RAG Context Window Calculator.
- Also compare with the AI Token Cost Calculator.
- Browse AI products in the AI tools directory when you want a tool listing rather than a token estimate.
FAQ
Why does a long chat cost more than the sum of the new messages?
Each new turn retransmits the earlier messages as input. Turn 10 pays for turn 10 and also pays again for turns 1 through 9.
Does this include a retrieved document?
No. Add retrieved chunks in the RAG context window calculator. This page is only the growing chat transcript.
What is the session cost?
The sum of input and output cost from turn 1 through the turn you selected, at the rate you entered.