RAG Chunk Size Calculator
Recommend a RAG chunk size, overlap and chunking strategy from document type, query type and embedding model, with a context-window token budget.
RAG Chunk Size Calculator
Document profile
Recommendations
Chunk size 461 tokens, overlap 46 tokens, recursive strategy
Reasoning
- - General text: balanced 512-token chunks with recursive splitting.
- - Factual lookups work well with focused, smaller chunks.
- - Final chunk size: 461 tokens with 46 token overlap (10%).
- - Token budget: 2,305 tokens for 5 chunks.
Token budget breakdown
About the RAG chunk size calculator
This tool uses a rule-based decision tree to recommend optimal chunk sizes, overlap, and splitting strategies based on your document type, query patterns, and embedding model constraints. The token budget visualizer shows how your context window is allocated across system prompt, retrieved chunks, query, and response.
Updated . Provided as is. Check the output before you rely on it in production.
How to use RAG Chunk Size Calculator
- 1
Describe your documents
Pick the document type (technical docs, legal, source code, chat, research papers, product descriptions, FAQ or general text) and the average document length.
- 2
Describe your queries
Choose the query type (factual lookup, analytical, conversational or comparison) and how many chunks you retrieve (top-k).
- 3
Pick the embedding model
Choose the embedding model so the recommended chunk size stays within its input limit.
- 4
Read the recommendation
Get a chunk size, overlap and chunking strategy with the reasoning, plus a token budget for system prompt, retrieved chunks, query and response against your context window.
- 5
Export
Export the recommendation as Markdown for your design doc.
Questions and answers
What is the best chunk size for RAG?
What is chunk overlap and why does it matter?
Which chunking strategy should I use?
How many chunks should I retrieve (top-k)?
Does chunk size affect embedding quality?
For AI agents: how to call this tool
Machine-readable contract, endpoints and examples. Humans can ignore this section.
Best Path For Builders
Browser workflow
Runs instantly in the browser with private local processing and copy/export-ready output.
Browser Workflow
This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.
/rag-chunk-calculator/
For automation planning, fetch the canonical contract at /api/tool/rag-chunk-calculator.json.