Skip to content
ENExplore Calculators

Index Size Estimate Calculator

Work out index size estimate instantly with clear inputs, formula shown and shareable results.

About Index Size Estimate Calculator

A B-tree index stores the key plus a row pointer at every leaf, divided by the fill factor because pages are deliberately left partly empty to absorb inserts. Internal levels add barely one percent. Depth is the logarithm of row count in the base of entries per page, which is why even billion-row tables need only four or five levels — and why index lookups stay fast.

Formula

Index size

entry = key bytes + pointer bytes; leaf size = rows x entry / fill factor; depth = ceil(log(rows) / log(entries per page))

Worked example

With the default values below, Index Size Estimate Calculator returns Estimated index size of 2.15 GiB. Change any input above and every figure here is recalculated in your browser.

Inputs used

Rows in the tableminimum 1
50,000,000
Indexed key sizeminimum 1 bytes
24 bytes
Row pointer sizeaccepts 1–16 bytes
8 bytes
Page fill factoraccepts 10–100 %
70 %

Results

Estimated index size
2.15 GiB
Leaf level size
2.13 GiB
B-tree depth
4 levels
Bytes per index entry
32 B

Step by step

  1. 1Values used
  2. 2Index size
  3. 3Estimated index size= 2,313,142,857
  4. 4Leaf level size= 2,285,714,286
  5. 5B-tree depth= 4 levels
  6. 6Bytes per index entry= 32

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 whole numbers, 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 indexes slow down writes?

Every insert, update of an indexed column, and delete must maintain each index. Five indexes mean roughly five times the write amplification of the table alone.

What fill factor should I use?

Around 90 percent for append-only tables and 70 percent where inserts land in the middle of the key range, which reduces page splits at the cost of size.

Index Size Estimate Calculator | Calcrivo