On-Prem AIFree Interactive Tool

RAG Chunking Strategy Calculator: Size Chunks, Cost, and Storage

This free RAG chunking strategy calculator converts corpus size, chunk length, and overlap into a concrete chunk count, one-time embedding cost, and vector storage footprint, and it is built for AI engineers and solution architects planning enterprise retrieval systems. Enter your corpus size in pages, average tokens per page, target chunk size, overlap percentage, and embedding price, and the tool returns exactly how many vector records the pipeline will produce and what it will cost to build. Chunking decisions made in a spreadsheet before ingestion starts save far more engineering time than tuning retrieval after a poorly chunked index is already in production.

Your numbers

pages

Total pages across all documents you intend to index, including manuals, drawings text, SOPs, and ERP exports.

tokens

Dense technical text runs 500-700 tokens per page; tables and drawings with sparse text run lower.

tokens

The size of each retrieved passage. Smaller chunks improve precision; larger chunks preserve more context per hit.

15 %

Percent of each chunk repeated in the next chunk to avoid splitting a fact across a boundary.

$

Commercial embedding APIs range roughly $0.02-$0.20 per million tokens; self-hosted open embedding models have no per-token bill.

Higher dimensionality generally improves recall slightly but increases storage linearly.

Your results

Total chunks produced
57,445
Number of vector records the ingestion pipeline will produce, accounting for overlap.
Total corpus tokens
25,000,000
Total tokens across the entire source corpus before chunking.
One-time embedding cost
$4
Cost to embed every chunk once, including the tokens re-embedded due to overlap.
Raw vector storage
0.46
Storage for the embedding vectors plus a 30% index overhead allowance, in gigabytes.
Average chunks per page
1.15
A sanity check ratio. Above 3-4 chunks per page usually signals chunks are too small for the document type.

Estimates only. Real tokenizers, PDF extraction quality, and table handling change actual counts by 10-20%. Validate against a sample of your own corpus before committing to a chunking strategy at scale.

Get your full chunking and ingestion sizing worksheet

We will email you a personalized chunk count, cost, and storage worksheet across multiple chunk size scenarios, and a Netray AI architect will follow up with a 30-minute retrieval design review.

No spam. Your results stay private. Unsubscribe anytime.

How the chunk math works

The calculator first converts pages into total corpus tokens, then divides by the effective stride between chunks, which is chunk size reduced by the overlap percentage. With the defaults, 50,000 pages at 500 tokens per page produces 25 million total tokens. A 512-token chunk with 15% overlap has a stride of about 435 tokens, so the corpus splits into roughly 57,000 chunks. Embedding cost is calculated on the tokens actually sent to the embedding model, which is chunk count times chunk size, not the raw corpus size, because overlapping regions get embedded more than once. Storage assumes 4 bytes per dimension for standard float32 vectors plus a 30% allowance for index structures like HNSW graphs.

  • Total tokens = corpus pages times average tokens per page.
  • Effective stride = chunk size times (1 minus overlap percent).
  • Chunk count = total tokens divided by effective stride, rounded up.
  • Embedding cost is billed on chunk count times chunk size, which is always larger than the raw corpus token count.

Choosing chunk size and overlap

There is no universally correct chunk size, only a correct chunk size for a given document type and query pattern. Short chunks around 256-400 tokens favor precision on single-fact lookups like part numbers or spec values. Longer chunks around 800-1200 tokens preserve more surrounding context, which matters for procedural or narrative content where meaning depends on the paragraph around a sentence. Overlap exists purely to prevent a fact from being split exactly at a chunk boundary, and 10-20% is enough for most technical content; higher overlap mostly inflates embedding cost and storage without improving recall.

  • Structured technical content (specs, part catalogs) usually favors 256-512 token chunks.
  • Narrative and procedural content (SOPs, service reports) usually favors 600-1000 token chunks.
  • Overlap beyond 20% rarely improves recall and reliably increases cost and storage.
  • Chunking on document structure (headings, steps, table rows) beats fixed-size splitting whenever the source format allows it.

Reading your cost and storage numbers

Embedding cost with a commercial API is almost always a rounding error compared to the engineering time spent tuning the pipeline, which is why the defaults show a $50,000-page corpus costing under $4 to embed once. The number that matters more operationally is chunk count, because it drives vector database sizing, query latency, and index rebuild time whenever source documents change. If avg_chunks_per_page comes back above 3-4, your chunk size is likely too small for the document type and you are paying a latency and storage tax without a recall benefit. Re-embedding on every document update is the recurring cost to plan for, not the initial load.

How Netray builds chunking pipelines that hold up in production

Netray builds retrieval systems over manufacturing content that resists naive fixed-size chunking: revision-controlled work instructions, engineering drawings with embedded text, supplier certifications, and years of ERP transaction history in SyteLine and LN. We chunk on document structure rather than character counts, tune chunk size per content type instead of applying one setting to an entire corpus, and validate recall against a golden question set before anything ships to production. For customers who cannot send data to a commercial embedding API, we run the entire pipeline, including the embedding model, on-prem.

Frequently Asked Questions

What chunk size should I start with for enterprise documents?

Start at 400-600 tokens for mixed technical content and adjust based on measured recall, not intuition. Specification and parts data benefit from smaller chunks around 256-400 tokens because facts are dense and localized. Procedural documents like SOPs and inspection reports benefit from 600-1000 token chunks because the meaning depends on surrounding steps. Test both against a golden question set before committing to one size across the whole corpus.

Does more overlap improve retrieval quality?

Only up to a point, and that point is low. Overlap exists to stop a single fact from being split exactly at a chunk boundary, and 10-20% overlap solves that problem for almost all technical content. Beyond 20%, you are mostly paying to embed and store the same text multiple times without a measurable recall gain. If you find yourself needing 40%+ overlap to get good results, the real problem is usually chunk boundaries that ignore document structure.

How often does the corpus need to be re-chunked and re-embedded?

Only the changed documents need re-processing, not the whole corpus, if your pipeline tracks document versions and their associated chunk IDs. A well-built ingestion pipeline diffs incoming documents against the last indexed version and only re-embeds and re-indexes the delta. Rebuilding the entire index on every update is a common early design mistake that turns a five-minute content change into an hours-long batch job.

Should chunk size match my model's context window?

No, they solve different problems. Chunk size controls retrieval precision and should be tuned to how densely facts appear in your documents. Context window controls how many retrieved chunks, plus system prompt and conversation history, you can pass to the model in one call. A well-tuned system typically retrieves 5-15 chunks per query regardless of window size, because recall saturates and irrelevant context actively hurts answer quality beyond that range.

Get a chunking and ingestion architecture tuned to your document types, not a one-size-fits-all default.