Calculator

Embedding / RAG cost estimator

Model indexing, retrieval context, and answer generation spend for retrieval-augmented apps—before you scale traffic.

RAG economics

Ongoing monthly spend

$6.29/ month

First month with index: $6.33 · $0.000629 / query

Index once$0.04
One-time (or re-index)
Query forever$6.29
Embeds + generation / mo
Index once$0.04
Query embeds / mo$0.016
Generation / mo$6.27
Index ≈ months of queries0.0 mo

Workload

Corpus & queries

Index once vs query forever

Cost waterfall

One-time index sits above the recurring monthly stack.

Index once (embeddings)$0.04
Query embeds / month$0.016
Generation input / month$3.87
Generation output / month$2.40
First month total$6.33

Monthly ongoing stack

Query embeds$0.016
Generation$6.27

Assumes retrieved context is billed as generation input. Updated 2026-07-31. Approximate static list prices for planning only. Always verify against each provider’s official pricing page before production budgeting.

Guide

How to get value from this calculator

Model the full cost of a retrieval-augmented generation pipeline: one-time indexing, ongoing embedding updates, retrieval queries, and generation at query time. RAG spend spans three billing surfaces—embeddings, vector storage (outside this tool), and LLM tokens—so isolating each helps you find the dominant cost driver.

Cost formula

RAG monthly cost = indexing cost (chunks × embed price) + query embed cost (queries × embed price) + generation cost (queries × (context input tokens + output tokens) priced per 1M tokens)

Why it matters

RAG systems hide cost in embedding re-indexing and fat context windows. Teams that only price the final LLM call miss indexing spikes during document uploads and the input-token premium from large retrieved chunks on every query.

How to use it

  1. Enter corpus size in documents or chunks and choose an embedding model.
  2. Estimate how often you re-index or add new documents each month.
  3. Set expected user queries per day and average retrieved context size in tokens.
  4. Enter average generation output length per query.
  5. Review the index-once vs query-forever split between embedding and generation cost.
  6. Adjust chunk count or top-K retrieval to see sensitivity before committing architecture.

Planning tips

  • Smaller chunks increase embed call count; larger chunks inflate generation input cost—find the balance.
  • Cache embeddings for unchanged documents instead of re-embedding the full corpus nightly.
  • Use a cheaper embed model for retrieval if your eval quality holds.
  • Top-K of 3–5 is often enough; raising K linearly increases input tokens and cost per query.
  • If query-forever spend dwarfs index-once, optimize retrieval context before re-indexing.
  • Batch embedding jobs where supported to reduce per-token overhead on bulk indexing.

Frequently asked questions

Does this include vector database hosting?

No. This calculator covers embedding and LLM API costs only. Vector store, storage, and compute for Pinecone, pgvector, or similar are separate infrastructure line items.

How accurate are embedding prices here?

CentsPerToken uses approximate list prices for planning. Verify embedding rates on your provider's pricing page—they differ from chat model token pricing.

Should I count query embeddings separately from document embeddings?

Yes. Document embedding is often a one-time or infrequent cost; query embeddings recur on every user search and add up at monthly volume.

What about reranking?

LLM or cross-encoder reranking adds another cost layer. Use the RAG rerank calculator to compare pipelines with and without reranking.