Embedding a 25,000-document corpus with OpenAI's text-embedding-3-small costs 77 cents. Answering 120,000 questions against it costs $228 a month. Teams spend weeks choosing between embedding models and minutes choosing top-k, which is precisely the wrong way round. Here is the full breakdown of that example, cost centre by cost centre, using the calculator's defaults: 25,000 documents of 900 words, 512-token chunks with 15% overlap, 8% monthly churn, 120,000 queries retrieving 6 chunks each, 350-token answers, generation on Gemini 2.5 Flash at $0.30/$2.50 per million tokens.
1. Indexing the corpus — a one-off $0.77
900 words is about 1,197 tokens. With 512-token chunks at 15% overlap, each new chunk advances the cursor by only 512 × 0.85 = 435.2 tokens, so a document needs ⌈1,197 ÷ 435.2⌉ = 3 chunks. Across 25,000 documents that is 75,000 chunks, and 75,000 × 512 = 38.4 million tokens to embed. At text-embedding-3-small's $0.02 per million, the initial build costs $0.77.
Two things follow. First, overlap is what makes this number move: raise it from 15% to 40% and the stride drops to 307.2, giving 4 chunks per document, 100,000 chunks and 51.2 million tokens — a 33% increase in both embedding cost and storage for a retrieval-quality improvement you should verify rather than assume. Second, chunk size barely touches the embedding total at fixed overlap. Halve chunks to 256 tokens and you get 6 per document instead of 3, but each is half the size: still 38.4 million tokens. What doubles is the chunk count, and therefore the index.
Because indexing is measured in cents, model selection here is almost free. Voyage's voyage-4-large at $0.12 per million would make the same build cost $4.61 instead of $0.77. If it retrieves better, take it — $3.84 is not a budget conversation. Embedding model selection covers the criteria that should actually decide it.
2. Keeping the index current — $0.06 a month
At 8% monthly churn you re-embed 8% of the corpus: 8% of $0.77 is about 6 cents. Even at 100% churn — a corpus fully rewritten every month — you would pay $0.77. Re-embedding costs are a rounding error at any realistic corpus size, and the only version of this that hurts is a full re-index forced by switching embedding models, which is still a one-off $0.77 rather than a recurring line.
3. Vector storage — $0.18 a month
The formula the calculator uses is dimensions × 4 bytes × chunks × index overhead. Each dimension is a 32-bit float, so a 1,536-dimensional vector is 6,144 bytes raw. Across 75,000 chunks that is 460.8 MB. Multiply by 1.6 for the graph structure, ID mappings and metadata that an HNSW-style index carries alongside the raw vectors, and you get 0.74 GB. At $0.25 per GB per month, $0.18.
Scale that mentally before you panic about vector database pricing: ten million chunks at 1,536 dimensions is 98 GB, or $24.60 a month at the same rate. Dimensionality is the multiplier to watch — moving to text-embedding-3-large at 3,072 dimensions doubles the storage line exactly, to 1.47 GB and $0.37 here. Quantising to 8-bit cuts it by four. Neither decision is going to save your budget, but both matter once you are past a hundred million chunks.
4. Generation — $228.19 a month, and 99.9% of the total
Every query sends the retrieved chunks back through a generation model. With top-k 6 and 512-token chunks, that is 6 × 512 = 3,072 tokens of retrieved context plus roughly 350 tokens of question and instructions: 3,422 input tokens per query.
On Gemini 2.5 Flash: 3,422 ÷ 1,000,000 × $0.30 = $0.0010266 for input, plus 350 ÷ 1,000,000 × $2.50 = $0.000875 for the answer. That is $0.0019016 a query, and across 120,000 queries, $228.19. Add the query embeddings — 120,000 × 20 tokens = 2.4 million at $0.02 per million, 5 cents — and the recurring total is $228.48, of which generation is 99.9%.
Why top-k dominates everything else
Halve top-k from 6 to 3 and the input drops to 3 × 512 + 350 = 1,886 tokens. The per-query cost becomes $0.0005658 + $0.000875 = $0.0014408, and the monthly bill falls to $172.90 — $55.29 saved, a 24% cut, from changing one integer. Note that the answer cost is unchanged; only the retrieval half moves, which is why the saving is 24% rather than 50%.
The equivalent lever is chunk size, and it works through the same channel. Retrieving 6 chunks of 256 tokens sends 1,886 input tokens — identical to retrieving 3 chunks of 512. What the generation model bills you for is k × chunk size, not either one separately. Six small chunks and three large ones cost the same and retrieve differently: small chunks give you more independent hits and better precision, large chunks give you more surrounding context per hit. Choose on retrieval quality, and treat the retrieved-token budget as the thing you are holding constant.
By contrast, the model selector is a bigger lever still and a cruder one. Run the same 3,422-in/350-out query on Claude Sonnet 5 at $2.00/$10.00 and each query costs $0.006844 + $0.0035 = $0.010344 — $1,241.28 a month, 5.4× the Gemini 2.5 Flash figure. RAG is the workload where cheap models earn their keep, because retrieval has already done the hard part: the model is summarising supplied text rather than recalling anything.
Two costs this calculator deliberately omits. Reranking, if you use it, adds a second model pass over the retrieved set — usually cheap per call but applied to every query, so multiply carefully. And the vector database's compute charge, as opposed to its storage charge, varies so wildly between managed services and self-hosted pgvector that a single default would mislead; price it from your provider's own page and add it to the $228.
Before committing to any of this, check whether you need retrieval at all. At low query volumes, putting the whole corpus in a long context window is cheaper than building and maintaining a pipeline — the context window cost calculator finds the crossover, and RAG vs long context argues the non-cost half of the decision.
Prices used by this calculator were last verified on 15 August 2026 from the vendors' own pricing pages. See the full price index for every figure and its source, the change log for what has moved recently, and the methodology for how the index is maintained and where its limits are.