RAG cost calculator: per query, per 1,000 questions and per month
A RAG request pays for the prompt you send, the retrieved passages you paste into it and the answer the model writes. Enter your monthly question volume and token counts to get cost per query, per 1,000 questions and per month at the official list rates on this page. Embedding and reranking are extra: their rates are yours to enter, because we do not verify them.
What a RAG request pays for
The three billable parts
Every RAG answer bills two kinds of token and, on some stacks, two more services. The generation call pays for the input it sees (your system prompt, the user question and the retrieved passages) and for the output it writes. Embedding the question and indexing your documents is billed separately, usually per input token. Reranking is often priced per query or per 1,000 requests rather than per token.
This page prices the generation call from the same verified list rates as the rest of the site. Embedding and reranking are your inputs: we do not keep a verified price for embedding or reranker models, so we do not pretend to. Leave those fields at 0 to see the generation-only cost, or enter the rate your provider quotes you.
Estimate your RAG bill
Worked examples: context size dominates
Same question, same answer, different retrieved context
8,000-token prompt (800 system + question, 7,200 retrieved context in the second row) and a 300-token answer, 10,000 questions per month, no caching, list rates from src/prices.json. The examples below use a 800-token system+question block; the retrieved context is the only thing that changes between the two columns of each model.
| Model (list rate) | Retrieved context tokens | Cost per query | Per 1,000 questions | Monthly at 10,000 questions | Rate checked |
|---|---|---|---|---|---|
| GPT-6.1 Sol | 6,000 | $0.0166 | $16.60 | $166 | 2026-11-15 |
| GPT-6.1 Sol | 20,000 | $0.0446 | $44.60 | $446 | 2026-11-15 |
| Claude Haiku 5.5 | 6,000 | $0.00083 | $0.8300 | $8.30 | 2026-11-15 |
| Claude Haiku 5.5 | 20,000 | $0.00223 | $2.23 | $22.30 | 2026-11-15 |
| Gemini 3.8 Flash | 6,000 | $0.00622 | $6.22 | $62.25 | 2026-11-15 |
| Gemini 3.8 Flash | 20,000 | $0.0167 | $16.73 | $167 | 2026-11-15 |
Recompute any row with the calculator above. Embedding and reranking are excluded from this table: the rates differ by provider and we do not verify them here.
What this estimate does not include
Four costs your invoice will add
Retries and failed calls, the vector database or search service you retrieve from, orchestration and hosting, and any long-context or priority tier the provider charges above its standard rate. Batch pricing is also excluded: this page uses standard short-context list rates, the same convention as the homepage calculator.
Check the rate before you commit
Each price row carries the date we last read the provider page. Confirm the rate on the provider page linked from the model page before you set a budget, and treat this page as an estimate, not a quote.
Related calculators
- AI agent cost calculator: per run, per task, per month
- Turn this monthly bill into a price per user and a margin
- Token cost calculator: what 1M tokens cost
- LLM API cost calculator: compare every verified model for one workload
- What coding agents, skills and MCP servers cost in tokens
- What three real workloads cost: support, RAG and batch
- Every model price per 1M tokens
Questions
What does a RAG answer cost per query?
It depends almost entirely on how much retrieved context the model sees. At 800 system+question tokens, 6,000 retrieved tokens and a 300-token answer, one query costs roughly 1.7 cents on a 2-dollar-per-million input model and under a tenth of a cent on the cheapest verified models. Change the context size in the calculator to see the difference.
Why is retrieved context the biggest cost driver?
Because every retrieved passage is input tokens on every request. Doubling context from 6,000 to 20,000 tokens roughly triples the generation cost of the answer on the same model, while a tighter retrieval budget, deduplicating passages and reranking before generation usually cut cost more than switching models.
Does prompt caching help a RAG app?
It helps when the same prefix repeats on every request, normally a long system instruction or a fixed document set. The calculator applies the cached-input rate you can see on each model row. Some providers also charge a cache-write premium and keep the cache for a limited window, so a cached prefix that changes per request can cost more than it saves.
Are embedding and reranking costs included?
No. We price only the generation call from verified list rates. Enter your own embedding rate and reranking rate to include them in the monthly total; we label them as your inputs because this site does not keep a verified price for those services.
How is the per-query number calculated?
Cost per query = (input tokens x input rate + output tokens x output rate) / 1,000,000, with the cached share of the input billed at the cached-input rate when the model has one. The monthly total multiplies that by your question volume and adds your embedding and reranking inputs.
What is not in this estimate?
Retries, the vector database, retrieval infrastructure, orchestration and hosting, long-context or priority tiers, and batch discounts. All rates are standard short-context list prices, the same basis as the homepage calculator.
Next step → Turn this monthly bill into a price per user
Price data last checked 2026-11-18 against official sources · how we verify
Price-change alerts
One short email when a provider changes a price or a promo ends. No spam, unsubscribe any time.