RAG Chunk Size & Token Cost Calculator

Your RAG chunk size and top-K retrieval count directly control both embedding index volume and monthly LLM input token bills. Sweep chunk sizes below to compare retrieval precision, index size, and generation spend.

Interactive calculator

Chunk SizeTotal ChunksContext / QueryEmbed Cost (1x)Monthly LLM Spend

Frequently asked questions

What is the best default RAG chunk size in 2026?

512 tokens with 10% to 15% overlap is the strongest general baseline. Technical docs and codebases often perform better at 384 to 512 tokens paired with a cross-encoder reranker.

Does embedding cost or LLM generation cost matter more in RAG?

LLM generation input tokens usually exceed embedding costs by 50x to 500x. Cutting top-K from 12 to 6 via reranking saves far more than switching embedding models.

How much overlap should I use between RAG chunks?

10% to 15% overlap prevents splitting key sentences across chunk boundaries without inflating vector storage or retrieval duplication.

All calculations run 100% locally in your browser with zero external API calls. Pricing and rate limits reflect published 2026 provider rate cards.