Calculators

AI and automation

RAG Embedding Cost and Chunk Planner

Plan chunk count, embedding spend, vector storage, and retrieved context before you index a document collection.

When to use this

Use it before a RAG pilot becomes an ingestion job

This tool is for support knowledge bases, documentation sites, policy libraries, internal wikis, and product manuals where chunking choices affect cost, retrieval quality, and model context use.

Default result

The server-rendered support KB example creates 1,143 chunks and costs $0.0183 to embed once before vector database operation charges.

Plan chunks and embedding cost

Start with a corpus preset, then adjust tokens, overlap, model, refresh rate, and storage pricing.

Embedding tokens

914,200 tokens

Overlap adds 14.3% over the raw content token estimate.

Retrieval context

4,900 tokens

That is 3.8% of the selected chat context window.

Model guardrail

OpenAI text-embedding-3-small

Chunk size is below the selected embedding model input limit.

Worked example: 1,000 support articles

The default example has 1,000 documents at 600 words each, or 600,000 words. At 0.75 words per token, that is 600,000 / 0.75 = 800,000 estimated content tokens.

With 800-token chunks and 100-token overlap, the stride is 700 tokens. Chunk count is ceil((800,000 - 800) / 700) + 1 = 1,143 chunks.

Overlap is embedded again, so billable embedding tokens are 800,000 + 100 x 1,142 = 914,200 tokens. At $0.02 per 1M tokens, one-time embedding cost is 914,200 / 1,000,000 x $0.02 = $0.0183.

Storage uses 1,536 dimensions x 4 bytes plus 1,024 metadata bytes per vector. That is 1,143 x 7,168 bytes = 8,193,024 bytes, or about 0.008 GB. At $0.33 per GB-month, raw vector storage is about $0.0027 per month before read, write, backup, and reranking charges.

How the RAG chunk planner works

The planner estimates content tokens from document count, average words per document, and words per token. It then applies overlap chunking: stride equals chunk size minus overlap, and chunk count equals the number of windows needed to cover the token estimate.

Embedding cost is based on billable embedding tokens, including repeated overlap. Vector storage is estimated from chunk count, embedding dimensions, bytes per dimension, and metadata bytes per vector.

How many chunks will my RAG system create?

Chunk count rises when documents are longer, chunks are smaller, or overlap is larger. Small chunks can improve precise retrieval, but they also increase index size and can require a higher top-k to reconstruct enough context.

How much context will retrieval use?

Retrieved context tokens equal query tokens plus top-k multiplied by chunk size. This is only the retrieval payload; the final chat request also needs system instructions, tool schemas, user text, and output tokens.

What this estimate excludes

The storage result is a raw dense-vector estimate. It excludes vector database minimum plan fees, replicas, read units, write units, backups, imports, reranking, hybrid sparse indexes, metadata indexes, observability, and engineering time.

What to do next

Run a small retrieval-quality test before indexing everything. Sample real user questions, compare chunk sizes, check citations, measure missed answers, and only then approve the embedding and vector database budget.

Reference data used by the defaults

Topic Reference value Source Date Note
OpenAI embedding dimensions and max input text-embedding-3-small uses 1,536 dimensions; text-embedding-3-large uses 3,072 dimensions; both rows list 8,192 max input tokens. OpenAI embeddings documentation As of June 19, 2026 The calculator uses those defaults for vector storage size and chunk-size warnings.
OpenAI embedding price basis The docs price usage per input token and show pages per dollar assuming about 800 tokens per page. OpenAI embeddings documentation As of June 19, 2026 The default $0.02 and $0.13 per 1M token rates are derived from the pages-per-dollar table. Verify your billing page before spend approval.
Pinecone database storage $0.33 per GB per month on paid database plans after included storage. Pinecone pricing As of June 19, 2026 This calculator estimates raw dense-vector storage only. Read units, write units, backups, import, reranking, and managed assistant features can add cost.
Pinecone read and write units Pricing table also lists read-unit and write-unit charges by plan, cloud, and region. Pinecone pricing As of June 19, 2026 Operation charges are excluded from the storage estimate because query volume and vendor accounting differ by setup.

All provider prices should be replaced with current account, region, and plan terms before approving production spend.

FAQ

Is embedding cost usually the expensive part of RAG?

Often no. For text collections, one-time embedding can be tiny compared with engineering time, reranking, chat model tokens, vector database operations, and support. It still matters when you re-embed frequently or process very large corpora.

Why does overlap increase embedding tokens?

Overlap repeats tokens across neighboring chunks so answers do not lose context at chunk boundaries. Those repeated tokens are sent to the embedding model again, so the billable token count is higher than the raw document token count.

What chunk size should I start with?

Start around 500 to 1,000 tokens for many text RAG systems, then test retrieval quality. Short chunks improve precision but can miss context. Long chunks preserve context but consume more retrieval window and may reduce ranking precision.

Does vector storage equal the final vendor bill?

No. Raw dense-vector storage is only one layer. Managed vector databases may charge for read units, write units, backups, imports, replicas, pods, rerankers, assistants, or minimum plan fees.

Should I use text-embedding-3-small or text-embedding-3-large?

Use the smaller model first when cost, speed, and storage are the priority. Test the larger model when retrieval quality is the bottleneck and the added dimension count and embedding cost are justified.

How do I reduce RAG cost without hurting quality?

Deduplicate documents, remove boilerplate, avoid embedding navigation text, lower overlap after testing, re-embed only changed documents, and keep retrieval top-k as low as answer quality allows.

Decision path

What to do next