RAG Cost Calculator (Embeddings, Vector Storage & Queries)
A retrieval-augmented generation system has three separable bills: embedding the corpus once, storing the vectors every month, and paying the generation model on every query. Enter your document count, average document length, and chunk size; pick an embedding model and a generation model from the July 2026 price snapshot; set your query volume and how much retrieved context each query carries. The calculator returns the one-time embedding cost, the monthly vector-storage cost (float32 vectors at your $/GB-month rate), the cost of a single query, and the total monthly bill — so you can see which of the three actually dominates before you commit to an architecture.
The corpus
$0.25/GB-mo is a typical managed vector DB rate — editable.
The queries
Prices as of 2026-07 — verify against provider pricing pages before budgeting.
Total monthly cost
$375.03
$375.00 queries + $0.03 vector storage / month
One-time embedding
$0.20
Cost / query
$0.0038
Vector storage
0.1229 GB
Cost detail
Assumes float32 vectors (4 bytes/dimension), raw vectors only. Excludes re-ranking, query embedding (negligible), and self-hosted vector DB infrastructure.
Monthly cost breakdown
Compare scenarios
Run the same calculation with two or three input sets side by side. Differences are highlighted; every number comes from the same tested formula as the calculator above.
| Input | Scenario A | Scenario B |
|---|---|---|
| Doc Count | ||
| Avg Tokens Per Doc | ||
| Chunk Tokens | ||
| Embedding Model Id | ||
| Vector Storage Usd Per Gb Month | ||
| Queries Per Month | ||
| Retrieved Tokens Per Query | ||
| Generation Model Id | ||
| Output Tokens Per Query |
How it works
One-time embedding cost = documents × average tokens per document ÷ 1M × the embedding model's price per million tokens. At the defaults, 10,000 documents of 1,000 tokens each are 10M tokens; at text-embedding-3-small's $0.02/MTok that is $0.20 — embedding is almost never the expensive part. Re-embedding after model changes or large corpus updates repeats this cost, so treat it as per-ingestion rather than strictly once.
Monthly storage cost starts from the vector count: each document yields ceil(average tokens ÷ chunk tokens) chunks, and each chunk becomes one vector. Storage bytes = vectors × embedding dimensions × 4 bytes, assuming float32 (no quantization); divide by 1e9 for GB and multiply by your $/GB-month rate. The $0.25/GB-month default is a typical managed vector-database storage rate — edit it to match your provider, because real bills also add index and metadata overhead this estimate leaves out.
Per-query cost = retrieved context tokens ÷ 1M × the generation model's input price + answer tokens ÷ 1M × its output price. Monthly query cost multiplies that by your query volume, and the monthly total adds storage. At the defaults — 2,000 retrieved tokens and a 500-token answer on GPT-5.4 mini — a query costs $0.00375, so 100,000 queries run $375/month against $0.03 of storage: in most RAG systems, generation dwarfs everything else. Embedding the query itself costs a few dozen tokens and is excluded as negligible.
Frequently asked questions
What costs does this calculator leave out?+
Several, deliberately. Re-ranking models (rerankers are often priced separately per query), query embedding (a few dozen tokens per query — fractions of a cent per hundred thousand queries, excluded as negligible), self-hosted vector-database infrastructure (this models a managed $/GB-month rate, not your own servers), and vector-index or metadata overhead on top of raw float32 vectors. It also assumes uncompressed float32 storage at 4 bytes per dimension; providers using quantization or dimension reduction will bill you less for storage than this estimates. Treat the output as a planning baseline, not an invoice.
Where do the model prices come from?+
From a static snapshot of official provider pricing pages — OpenAI, Anthropic, Google, Together AI for generation, and OpenAI plus Voyage AI for embeddings — read on 2026-07-07 (snapshot vintage 2026-07). Prices are per million tokens at standard list rates: no batch discounts, no prompt caching, no negotiated enterprise rates, all of which can cut the generation bill substantially. AI prices change frequently, so verify against each provider's current pricing page before budgeting real money.
Why does chunk size change my storage cost?+
Because storage is billed per vector, and chunk size sets how many vectors your corpus becomes: each document produces ceil(tokens ÷ chunk size) chunks, and every chunk is stored as one embedding of the model's full dimension count. Halving the chunk size roughly doubles the vector count and therefore the storage GB. Smaller chunks can retrieve more precisely but cost more to store and often push more total context into each query; larger chunks are cheaper to store but blunter to retrieve. This calculator prices the trade-off — it cannot tell you which retrieval quality is better for your corpus.
Related tools
Sources
Embed this calculator
+
Drop this calculator into your own site — free. Keep the credit link below the frame: it’s how the free embed stays free.