OpenSearch Index Size Calculator
Calculate OpenSearch index size on disk from document count and field mappings.
About OpenSearch Index Size Calculator
OpenSearch and Elasticsearch store a primary copy of every document plus one full copy per configured replica, then apply codec-level compression to the stored segments: index_size = docs × avg_doc_size × (1 + replicas) ÷ compression_ratio. Because replicas are full data copies (not just checksums), replica count multiplies storage directly, while compression works against the combined primary+replica footprint.
Formula
index_size_GB = docs × avg_doc_size_KB × (1 + replicas) / compression_ratio / (1024 × 1024)
- docs
- Total document count
- avg_doc_size_KB
- Average document size (KB)
- replicas
- Number of replica shards per primary
- compression_ratio
- Codec compression factor
Worked example
With the default values below, OpenSearch Index Size Calculator returns Estimated Index Size of 14.67. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Document Countaccepts 0–1,000,000,000,000 docs
- 5,000,000 docs
- Avg Document Sizeaccepts 0–100,000 KB
- 2 KB
- Replicasaccepts 0–10 replicas
- 1 replicas
- Compression Ratioaccepts 1–10 ×
- 1.3 ×
Results
- Estimated Index Size
- 14.67 GB
- Estimated Index Size
- 0.014 TB
- Effective Size per Document
- 3,150.8 bytes
- Raw Size with Replicas
- 20,000,000 KB
Step by step
- 1Raw size: docs × avg doc size= 10,000,000 KB
- 2With replicas: raw × (1 + replicas)= 20,000,000 KB
- 3Index size: with-replicas ÷ compression= 14.67 GB
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 3 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Why do replicas multiply storage instead of just adding overhead?
Each replica shard is a complete copy of its primary shard's data, kept in sync for search availability and resilience — so replica_count=1 doubles stored data, not just adds a small overhead.
What compression ratio is realistic for OpenSearch?
The default codec typically achieves modest compression (~1.1-1.2×); switching to `best_compression` (which uses DEFLATE) commonly reaches 1.3-1.6× at some CPU and indexing-latency cost.
Does the indexed size ever exceed the raw source document size?
Yes — inverted indexes, doc values, and stored fields can add overhead beyond the raw JSON source, especially for heavily analyzed text fields; the avg_doc_size input should reflect actual observed index footprint per doc where possible, not just raw JSON size.
How does this relate to shard count?
This calculator estimates total index size regardless of shard count; shard count instead determines how that total is distributed across primary shards, which affects query parallelism and per-shard resource usage.
Related Calculators
You might also need
- ELK Storage CalculatorCommonly used together
- Log Search Performance CalculatorCommonly used together
- Log Ingestion CalculatorCommonly used together
- Log Compression CalculatorCommonly used together
- Observability Cost CalculatorCommonly used together
- Zipkin Storage CalculatorAlso in Logging & Observability
