Index Size Calculator
Estimate index size and the write cost each index adds.
About Index Size Calculator
Index size follows from key width and fill factor. Each additional index multiplies write cost, because every insert or update must maintain all of them. Unused indexes cost storage and write throughput while delivering nothing, which makes auditing them one of the highest-value database tasks.
Formula
Index Size
Index size = ⌈rows ÷ entries per page⌉ × page size, where entries per page depends on fill factor
- fill factor
- Share of each page used, leaving room for inserts
- write amplification
- Every insert must also update every index
Worked example
With the default values below, Index Size Calculator returns Total Index Size of 4.3475. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Rows indexedminimum 0
- 20,000,000
- Indexed key sizeminimum 0 bytes
- 24 bytes
- Row pointer sizeminimum 0 bytes
- 8 bytes
- Page fill factoraccepts 0–100 %
- 70 %
- Number of such indexesminimum 0
- 5
Results
- Total Index Size
- 4.3475 GB
- Size per Index
- 0.8695 GB
- Estimated B-Tree Depth
- 4
- Write Amplification Factor
- 6.00 x
- Index Entries per Page
- 179
Step by step
- 1Values used
- 2Index Size
- 3Total Index Size= 4.3475 GB
- 4Size per Index= 0.8695 GB
- 5Estimated B-Tree Depth= 4
- 6Write Amplification Factor= 6.00 x
- 7Index Entries per Page= 179
Assumptions and limits
- The result is derived only from the 5 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 4 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
How is Index Size calculated?
Index size = ⌈rows ÷ entries per page⌉ × page size, where entries per page depends on fill factor Index size follows from key width and fill factor. Each additional index multiplies write cost, because every insert or update must maintain all of them.
Why does Index Size matter?
Unused indexes cost storage and write throughput while delivering nothing, which makes auditing them one of the highest-value database tasks.
What values do I need to enter?
This calculator takes 5 inputs: Rows indexed, Indexed key size, Row pointer size, Page fill factor, Number of such indexes. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
