AI Cost Calc

RAG Cost Calculator

What does retrieval-augmented generation really cost? Enter your corpus, query volume and models — get the one-time indexing cost, the monthly bill and the cost per query.

Estimates are for planning purposes only. Always verify current pricing on each provider's official pricing page.

Understand the bill

What RAG actually costs (and what it doesn't)

Retrieval-augmented generation has a reputation for being expensive — mostly earned by bad estimates. The pipeline has four cost lines: one-time indexing (embedding your corpus), vector database (storing vectors and searching them), recurring embeddings (each query, plus re-indexing new content), and LLM generation (writing the answers). The calculator prices each line separately, because they behave completely differently at scale.

The counterintuitive part: indexing is cheap

Embedding a 5,000-page corpus with a modern embedding model costs under a dollar — the defaults above work out to about 6 cents. Storage is similarly small: those pages become ~3,600 vectors occupying a few hundredths of a GB. The myth that "indexing our documents will be expensive" rarely survives contact with the arithmetic. What actually costs money is answering questions: LLM generation is typically 90%+ of a RAG bill at production query volumes.

Where the money goes at scale

Embedding model choice

Small embedding models ($0.02/1M tokens, 1,536 dimensions) handle most retrieval tasks; large ones ($0.13/1M, 3,072 dims) buy marginally better recall at 6× the embedding cost and double the storage, because storage scales with dimensions. Start small; upgrade only if retrieval quality measurably fails your evals.

Worked example

The defaults: 5,000 pages indexed for ~$0.06 one-time, stored in ~0.03 GB. At 50,000 queries/month with GPT-5.4 mini generating answers: vector DB ~$1.20, embeddings ~$0.03, generation ~$142 — ~$144/month total, 0.3¢ per query. The lesson is visible immediately: the database is noise, the LLM is the bill. If you're wrapping this pipeline in a chatbot, price the full product in the chatbot cost calculator, and check whether it pays off in the ROI calculator.

FAQ

Frequently asked questions

How much does it cost to embed my documents?

Almost nothing: at $0.02 per million tokens, a 5,000-page corpus (~2.5M tokens) costs about 6 cents to embed, plus 10–20% for chunk overlap. Even a 100,000-page archive indexes for a couple of dollars. The recurring costs — queries and generation — are where budgets should focus.

How much does Pinecone cost for a small RAG project?

Serverless vector databases price by storage and read/write units. A small corpus (tens of thousands of vectors) with moderate query volume typically lands from free-tier to a few tens of dollars monthly. Because billing units differ per vendor, this calculator lets you set effective $/GB and $/million-queries rates — verify current numbers on the provider's pricing page.

Why is my RAG bill dominated by the LLM?

Each query sends the question plus several retrieved chunks — often 2,000+ input tokens — to the generation model, and generates a few hundred output tokens. Multiply by monthly query volume and generation dwarfs storage and embeddings. Cutting retrieved chunks from 5 to 3 and capping answer length are the highest-impact optimizations.

Should I self-host the vector database?

Below roughly a million vectors, serverless is usually cheaper than the server you'd run pgvector or Qdrant on — and it's zero ops. Self-hosting starts winning at large scale (tens of millions of vectors, high query volume) or when data must stay on your infrastructure. Model both by editing the storage and query rate fields.