%3C/text%3E%3C/svg%3E">
💻
💻 Tech & IT

Database Table Size Estimator

Results update as you type.

Your numbers

Understanding the database table size estimator — concept and principle

Before creating a large table, it helps to know roughly how much disk it will need. This estimator multiplies the number of rows by their average size, allows for the free space left in each storage page, and adds a percentage for indexes. Database administrators and developers use it for capacity planning, choosing instance storage and estimating backup and replication volumes.

Estimating a database table size10 million rows of 200 bytes are 2.0 GB; pages kept 90% full need 2.22 GB, and 50% more for indexes makes about 3.33 GB.Rows fill pages, then indexes add more10,000,000 rows × 200 B= 2.0 GB of raw rowseach page 90% full2.0 ÷ 0.9= 2.22 GBData + 50% for indexesdata 2.22index 1.11≈ 3.33 GB on disk2.22 × 1.5 = 3.33 GB
Empty room in each page and the indexes both add to the raw 2 GB.

How it is calculated

The fill factor is the percentage of each page filled with rows; the rest is left free. Sizes are in decimal gigabytes (1 GB = 10⁹ bytes).

The principle

Relational databases store rows in fixed-size pages, for example 8 kB in PostgreSQL and 16 KB by default in MySQL's InnoDB. Pages are often not filled completely, either by design (a fill factor that leaves room for updates) or because of deletions and page splits. If only 90% of each page holds data, the table needs 1 ÷ 0.9 ≈ 1.11 times the raw bytes. Indexes are separate structures, usually B-trees, that store the indexed columns plus a pointer to each row; their size depends on how many indexes you have and how wide their keys are, so a percentage of table size is a practical shortcut.

Worked example

  1. Inputs: 10,000,000 rows, 200 bytes per row, 50% index overhead, 90% fill factor.
  2. Raw data: 10,000,000 × 200 = 2,000,000,000 bytes.
  3. Allowing for fill: 2,000,000,000 ÷ 0.9 ≈ 2,222,222,222 bytes = 2.22 GB.
  4. With indexes: 2.222 × 1.5 = 3.33 GB.
How Data size (GB) changes with Page fill factor (%)How Data size changes with Page fill fac…024681022.54567.590112135180Example: 2.222222222Page fill factor (%)
Each point is the calculator re-run with only “Page fill factor (%)” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
Page fill factor (%)Data size (GB)
22.58.888888889
454.444444444
67.52.962962963
902.222222222
1121.777777778
1351.481481481
1801.111111111

How to read the result

Treat the output as a lower-bound starting point. Real engines add per-row overhead: PostgreSQL stores a tuple header of about 23 bytes plus a 4-byte line pointer for each row, and variable-length columns and alignment padding add more. Plan disk space with headroom for growth, temporary files, write-ahead or redo logs and maintenance operations, which can need extra space while rebuilding tables or indexes.

Common mistakes

Keep in mind: This is a rough estimate. Compression, TOAST or overflow storage, encoding and engine-specific overhead can change the real size considerably; load a sample of real data and measure when accuracy matters.

Frequently asked questions

What fill factor should I use?

PostgreSQL tables default to 100% and B-tree indexes to 90%; a lower table fill factor can help heavily updated tables.

How can I measure the real size?

In PostgreSQL use pg_total_relation_size; in MySQL query information_schema.TABLES for data and index length.

Is 50% index overhead realistic?

It varies widely: a table with one small primary key may need far less, and one with many wide indexes can exceed 100%.

Sources: PostgreSQL Documentation, "Database Page Layout" and CREATE TABLE storage parameters (fillfactor) · MySQL Reference Manual, InnoDB page size (innodb_page_size)

Checked 8 Nov 2026. Standard formulas and RFC/IEEE definitions, computed locally in your browser — nothing you type is sent anywhere.

💻 All tech & IT tools →🌍 Calculators by country →