RAG document Q&A: token cost and retrieval budget calculator
In RAG, the prompt is the product: twelve retrieved chunks at 800 tokens each is 9,600 tokens of context before the user has even asked a question. That makes retrieval precision a direct cost decision. Pulling twenty chunks instead of eight does not improve answers as reliably as people assume, and it doubles the input line on every request.
Workload snapshot
Requests / day
2,500
including retries
Input tokens
12,000
per request
Cache hit rate
70%
of input tokens
Output tokens
500
per request
Active days
30
per month
Claude Sonnet 5.5
$978.00
per month at this workload
Gemini 4 Neon
$978.00
per month at this workload
DeepSeek V4 Pro
$532.62
per month at this workload
Estimated at December 2026 reference list pricing with the defaults above. Adjust the sliders below for your own numbers.
Model your own numbers
The workload above is already loaded. Change any input and every model re-prices instantly.
Completed API calls per day, including retries.
System prompt, context and history you send.
Share of input tokens served from a warm cache.
Generated answer length. Output usually costs 5x input.
22 for business tools, 30 for always-on traffic.
| Model | Input /1M | Cached /1M | Output /1M | Monthly | Relative cost | vs highest |
|---|---|---|---|---|---|---|
| Claude Haiku 5.5Anthropic | $0.1 | $0.01 | $0.5 | $52.05 | -99% | |
| DeepSeek V4.1 FlashDeepSeek | $0.3 | $0.006 | $1.2 | $129.78 | -98% | |
| Gemini 3.8 FlashGoogle | $0.75 | $0.075 | $3.75 | $390.38 | -93% | |
| Custom ModelYour numbers | $1.00 | $0.1 | $2.00 | $408.00 | -92% | |
| DeepSeek V4 ProDeepSeek | $1.32 | $0.044 | $3.96 | $532.62 | -90% | |
| Claude Sonnet 5.5Anthropic | $2.00 | $0.1 | $10.00 | $978.00 | -81% | |
| Gemini 4 NeonGoogle | $2.00 | $0.1 | $10.00 | $978.00 | -81% | |
| GPT-6.1 SolOpenAI | $2.00 | $0.1 | $10.00 | $978.00 | -81% | |
| Gemini 4 CarbonGoogle | $3.00 | $0.15 | $15.00 | $1,467 | -72% | |
| GPT-4o (Legacy)OpenAI | $2.5 | $1.25 | $10.00 | $1,838 | -65% | |
| Claude Opus 5.5Anthropic | $4.00 | $0.2 | $20.00 | $1,956 | -62% | |
| GPT-6.2 AstraOpenAI | $10.00 | $1.00 | $50.00 | $5,205 | baseline |
Sorted cheapest first. Bars are scaled to the most expensive model at your current inputs.
Cost-optimisation checklist
- Measure answer quality against chunk count. Most corpora saturate at 6-10 chunks; going from 8 to 20 rarely changes accuracy but reliably doubles input spend.
- Pin the retrieved documents in cache when the same document is queried repeatedly. A 70% cache hit rate on a 12K prompt is the difference between a workable and an unaffordable unit cost.
- Rerank cheaply. A small-model reranker that drops four irrelevant chunks pays for itself immediately by shrinking the expensive prompt.
- Return citations instead of restating the passage. Output is 5x the input rate, so quoting 300 tokens of source text costs more than reading it did.
- Cache the question itself: FAQ-style repeated questions with the same retrieved set are ideal cache candidates.
Cost questions about rag document q&a
What is a normal cost per RAG answer?
At 12K input and 500 output tokens, expect roughly a third of a cent on a budget tier and 1-3 cents on a mid tier per answer, before cache discounts. With a 70% hit rate the input line typically drops by more than half.
Does chunk size affect the bill?
Only through total context tokens, not through token granularity. Larger chunks per document mean fewer documents fit in your budget; smaller chunks mean more retrieval calls. Either way, the number that lands in the calculator is the total tokens you send.
Should I cache retrieved chunks?
Only when the same document set is reused. Per-user, one-shot retrieval has no reuse pattern, so model it at a low hit rate. A shared knowledge base queried by many users is the opposite case and benefits enormously.