Skip to main content

RAG cost planning

RAG Cost Calculator

Plan retrieval-augmented generation costs by modeling query volume, context tokens, and answer length. No documents or private text are collected.

Scenario assumptions

Start with these editable numeric assumptions, then adjust the calculator fields to match your own traffic and token usage.

Queries per month

5,000

Search or answer requests that call the generation model.

Retrieved context tokens

2,500

Chunks, citations, and source excerpts included with each query.

Question and instructions

500 tokens

User question, system guidance, and output formatting instructions.

Output tokens per answer

700

Average generated answer length after retrieval.

RAG app model and usage

Choose a model and edit the numeric assumptions for this RAG app scenario.
AnthropicClaude Sonnet 5

Input price

$2.00 / 1M tokens

Output price

$10.00 / 1M tokens

AnthropicClaude Sonnet 5Stable
Official source

Verified Aug 10, 2026. Estimates vary by usage and provider pricing conditions.

Usage assumptions

Estimate traffic and token usage for an average request.
Active seats, customers, or internal users.
Average AI calls per user each day.
Prompt, history, and retrieved context per request.
Generated answer length; SaaS founders should test long replies.
Reusable cached prompt or context tokens per request.
Use 30 for always-on products or fewer for batch jobs.

Estimated results

Run the calculator to see projected cost and usage volume.

Enter your usage details, then select Calculate estimate to see your projected cost.

Estimated cost = input usage cost + output usage cost + supported optional charges.

How to read the output

Use the result as a planning estimate, then validate against provider pricing and real usage once the workflow is live.

Generation cost

RAG spend is often driven by the size of retrieved context sent into the model for every query.

Context sensitivity

Run low and high context scenarios to see how chunk count and context length affect monthly cost.

Embedding note

If your provider charges separately for embeddings, estimate indexing and query embedding costs alongside this generation estimate.

Models to consider

These options come from the central model data and are suggestions to evaluate, not claims that one model is best for every workload.

Anthropic

Claude Sonnet 5

Text model to evaluate for retrieval answer generation.

Input $2.00 / 1M, output $10.00 / 1M.

Open model

Anthropic

Claude Sonnet 4.6

Text model to evaluate for retrieval answer generation.

Input $3.00 / 1M, output $15.00 / 1M.

Open model

Gemini

Gemini 3.5 Flash

Text model to evaluate for retrieval answer generation.

Input $1.50 / 1M, output $9.00 / 1M.

Open model

DeepSeek

DeepSeek-V4-Flash

Text model to evaluate for retrieval answer generation.

Input $0.22 / 1M, output $0.66 / 1M.

Open model

Related planning pages

Continue to a semantically related calculator, provider, or guide without entering private content.

RAG app FAQ

Short answers for estimating this scenario without sharing private prompts, documents, or customer data.

What affects RAG app cost the most?

The biggest drivers are query volume, retrieved context size, answer length, selected model price, and whether embeddings are billed separately.

Are retrieved documents included in the URL?

No. This calculator only uses numeric token assumptions and safe model/provider slugs, never raw document text.

How should I estimate retrieved context tokens?

Start with average chunk size multiplied by the number of chunks sent to the model, then add question and instruction tokens.