RAG Cost Calculator

Calculate the full cost of a RAG pipeline: document embedding, vector storage, and LLM generation.

Documents

Retrieval

Embedding

Provider: OpenAI
Dimensions: 1,536
Max input: 8,191 tokens
Price: $0.02/1M tokens

Cost Breakdown

2,000Total Chunks
$0.020Indexing (one-time)
$0.016Per Query
$46.89Monthly Total

One-Time Indexing

Total chunks to embed2,000
Tokens per chunk512
Total tokens to embed1,024,000
Indexing cost$0.020

Monthly Query Costs

Monthly queries3,000
Query embedding cost$0.0030/mo
LLM generation cost2,710 input + 500 output tokens/query$46.89/mo
Total monthly cost$46.89/mo

Save your results — get the cheatsheet

Drop your email and I'll send over my RAG Architecture Playbook (free PDF). You'll also join the newsletter — unsubscribe anytime.

Or preview the RAG Architecture Playbook landing page →

Estimates assume ~50 tokens per query and ~100 system prompt tokens. Actual costs depend on your tokenizer, chunk strategy, and provider pricing. Vector database storage costs (e.g., Pinecone, Weaviate) are not included. All calculations run locally in your browser.

What the RAG cost calculator does

A retrieval-augmented generation pipeline has three cost centres people usually underestimate: embedding your documents, storing and querying the vectors, and the LLM generation on every answer. This calculator adds all three so you can see the real monthly cost of a RAG system at your document volume and query load — not just the headline LLM price.

How to estimate a RAG pipeline

  1. Enter your corpus size (documents / tokens to embed) — a one-time or incremental cost.
  2. Set your query volume and the tokens retrieved + generated per answer.
  3. Read the breakdown: embedding, vector storage, and generation, plus the monthly total.

Why the generation step dominates at scale

Embedding is mostly a one-time cost and vector storage is cheap. It's the per-query LLM generation — retrieved context plus the answer, on every request — that scales with traffic and usually dwarfs the rest. Seeing the three lines separately shows where to optimise: smaller retrieved context, a cheaper generation model, or caching. To price the generation model, use the LLM pricing calculator.

Frequently asked questions

What's usually the biggest cost?

At meaningful query volume, LLM generation — it runs on every request and includes the retrieved-context tokens. Embedding is largely one-time.

How do I cut RAG costs?

Retrieve fewer and smaller chunks, use a cheaper generation model where quality allows, and cache answers to repeated queries.

Is it free?

Yes — a free browser tool, no signup.

SharePost

More tools like this