induwara.lkinduwara.lk
induwara.lkAI · Developer tools

AI Chatbot Conversation Cost Calculator

Estimate what a multi-turn AI chatbot really costs to run. Because every turn re-sends the whole conversation, cost grows with the square of conversation length — this tool models that correctly and prices the same workload across Claude, GPT, and Gemini, in dollars and rupees.

By Induwara AshinsanaUpdated Jun 5, 2026
Chatbot monthly cost

Grouped by provider. Price shown is input / output per 1M tokens.

Currency & caching

Tokens, sent every turn

Tokens per user turn

Tokens per reply

Back-and-forth rounds

Total monthly chats

Thinking in words? Tokens ≈ words × 1.33. So a 60-word message ≈ 80 tokens. Enter token counts above.

Quick presets
Cost per conversation
$0.02048
Estimated monthly cost
$61.44
Input tokens / conversation
12,480
Output: 1,600 tokens
Caching could save
62.95%
On input cost — toggle caching on

Why input dominates

Input: 12,480 tokens (88.64%)Output: 1,600 tokens

The final (most expensive) turn alone sends 2,540 input tokens. Closed-form total verified against turn-by-turn summation.

Cost per conversation vs. turns

Same prompt and message sizes, more turns. The curve bends upward — cost grows faster than the turn count because context re-sending compounds.

Turns per conversation

Same workload, every model

ModelPer chatMonthly
Gemini 2.0 Flash
One of the cheapest hosted models. Good for simple, high-throughput bots.
$0.00189$5.66
GPT-4o mini
Among the cheapest hosted chat models. Tight budgets, simple intents.
$0.00283$8.50
GPT-5 mini
Cheaper GPT-5 tier for high-volume, lighter conversational work.
$0.00632$18.96
Gemini 2.5 Flash
Fast, low-cost Gemini tier built for high-volume chat.
$0.00774$23.23
Claude Haiku 4.5selected
Fastest, cheapest Claude. Strong fit for high-volume support and FAQ bots.
$0.02048$61.44
GPT-5
OpenAI flagship. Automatic prompt caching on repeated prefixes, billed at the cached-input rate.
$0.03160$94.80
Gemini 2.5 Pro
Google flagship. Listed price is the ≤200K-token-prompt tier; longer prompts cost more.
$0.03160$94.80
GPT-4o
Previous-generation flagship. Still widely deployed for chat.
$0.04720$141.60
Claude Sonnet 4.6
Balanced speed and intelligence. 1M-token context. A common production default.
$0.06144$184.32
Claude Opus 4.8
Most capable Claude model. 1M-token context. Best for hard reasoning; overkill for a simple support bot.
$0.10240$307.20

Sources cited: Anthropic pricing & prompt-caching docs (authoritative for Claude), OpenAI and Google Gemini pricing pages (transcribed, dated 2026-06-05), and the CBSL indicative USD→LKR rate. Full links are in the Sources & references section below. Caching figures are an estimate — real savings depend on the 5-minute cache window and your traffic pattern.

How it works

A single API call is easy to price: tokens in × input rate, plus tokens out × output rate. A conversationis the trap. Chat models are stateless, so to remember what was said your app re-sends the system prompt and the entire transcript on every single turn. The cost of one conversation is therefore far higher than the cost of one message — and most online “API cost” calculators ignore this entirely.

Let s be the system-prompt tokens, u the average user-message tokens, a the average AI-reply tokens, and N the number of turns. At turn t the request carries the system prompt, the whole transcript so far, and the new user message:

inputTokens(t) = s + (t − 1)·(u + a) + u

Summing every turn of one conversation gives the closed form the calculator uses:

  • total input = N·s + N·u + (u + a)·N·(N − 1)/2
  • total output = N·a

The N·(N − 1)/2 term is the quadratic blow-up — the reason a longer conversation costs disproportionately more. The calculator cross-checks this closed form against an explicit turn-by-turn summation so the two methods always agree to the token.

Cost per conversation is then (totalInput/1e6)·inputPrice + (totalOutput/1e6)·outputPrice, and the monthly bill is that figure times your conversation volume. Rupee figures multiply the dollar cost by an editable CBSL indicative exchange rate.

Prompt caching(the toggle) re-prices the stable prefix. The system prompt and prior transcript are served as cache reads at roughly 10% of the input price; only each turn's new user message is billed at full price, plus a one-time cache write at 1.25× input for newly added content (Anthropic's published model — OpenAI and Gemini auto-cache reads at their own published cached-input rate with no separate write fee). It is an estimate: real savings depend on the 5-minute cache window and how quickly users reply. Claude rates are authoritative; GPT and Gemini rates are transcribed from the official pricing pages and dated below.

Worked examples

Shared workload: a 500-token system prompt, 80-token user messages, 200-token replies, 8 turns per conversation, 3,000 conversations a month, at Rs 305 per US dollar.

Claude Haiku 4.5 — the budget support bot

  1. Total input = 8·500 + 8·80 + (280)·8·7/2 = 4,000 + 640 + 7,840 = 12,480 tokens
  2. Total output = 8·200 = 1,600 tokens
  3. Per conversation = 12,480/1e6·$1 + 1,600/1e6·$5 = $0.01248 + $0.00800 = $0.02048
  4. Monthly = $0.02048 × 3,000 = $61.44 (≈ Rs 18,739)

Claude Opus 4.8 — the same bot on the flagship model

  1. Tokens are identical: 12,480 input, 1,600 output
  2. Per conversation = 12,480/1e6·$5 + 1,600/1e6·$25 = $0.06240 + $0.04000 = $0.10240
  3. Monthly = $0.10240 × 3,000 = $307.20 (≈ Rs 93,696)
  4. Same workload, 5× the rates → 5× the bill. That is the model-choice decision in one line.

Edge case — a 20-turn conversation shows the quadratic blow-up

  1. Keep s=500, u=80, a=200 but raise N to 20
  2. Total input = 20·500 + 20·80 + 280·20·19/2 = 10,000 + 1,600 + 53,200 = 64,800 tokens
  3. On Haiku: per conversation = 64,800/1e6·$1 + 4,000/1e6·$5 = $0.0648 + $0.0200 = $0.0848
  4. 2.5× the turns (8 → 20) but ~4× the cost ($0.0205 → $0.0848) — context re-sending compounds.

Frequently asked questions

Sources & references

Claude rates are authoritative. GPT and Gemini rates were transcribed from the official pricing pages above and last verified on 2026-06-05; they are reviewed each quarter and whenever a provider announces a price change. The tool runs entirely in your browser — no inputs leave your device.

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, a pricing change, or want another provider added?

Email me at [email protected] — most fixes ship within 24 hours.