Database Size Calculator
Enter the number of rows, columns, the average size of each value, how many indexes the table has and how fast it grows. The calculator estimates table size, index size, the total on disk and the size a year from now.
- Table and indexes
- Bytes per row
- One year growth
Integers and dates are 4 to 8 bytes. For text, use the average real length plus 1 to 4 bytes.
Database size is rows times row size, plus indexes. Each row carries its data and a small header, about 24 bytes in PostgreSQL. Pages are not filled completely, and every index adds its own copy of the key. A table of 10 million rows with ten 8 byte columns and two indexes is about 1.9 GB.
Database size chart
10 columns of 8 bytes, 2 indexes. Search for a row count.
| Rows | Table | Indexes | Total |
|---|---|---|---|
| 10,000 | 1.16 MB | 0.75 MB | 1.9 MB |
| 100,000 | 11.6 MB | 7.5 MB | 19 MB |
| 1 million | 116 MB | 75 MB | 190 MB |
| 10 million | 1.16 GB | 0.75 GB | 1.9 GB |
| 100 million | 11.6 GB | 7.5 GB | 19 GB |
Real sizes vary by engine, fill factor and compression. Treat these as planning figures.
Rows and size
10 columns, 2 indexes. Slide the row count.
The cylinder shows how much of the space goes to indexes.
How to estimate database size
Rows × row size. Step through it.
Count the rows
Now and later.
To check a real table in PostgreSQL, run SELECT pg_total_relation_size('table_name').
Rows, columns or indexes
What drives size. Compare them.
Size grows in step with rows.
Each column adds bytes to every row.
Each index stores keys again.
Wide text or JSON columns are often the biggest single factor. Store large files outside the database.
Before you provision
Storage checks. Tick each item.
Tick each item as you go.
Plan disk for at least two years of growth, plus space for backups and temporary files during maintenance.
What you get
Size estimate. Each tile explains one result.
On disk.
Rows and headers.
All of them.
Bytes.
With growth.
Write-ahead logs and replication slots can use a lot of space on busy systems, beyond the table itself.
Frequently Asked Questions
No question matches that search.
How do I estimate database size?
Rows × (columns × bytes + about 24) ÷ 0.9, plus indexes.
How big is a table with a million rows?
About 100 to 200 MB with ten small columns and two indexes.
How much space do indexes use?
Often 30% to 50% of the table size.
How many bytes is an integer column?
4 bytes for a normal integer, 8 for a bigint.
How do I check a table's real size?
In PostgreSQL use pg_total_relation_size; in MySQL check information_schema.tables.
Does compression help?
Yes, it can halve the size of text-heavy tables.
How much headroom should I plan?
About 20% plus two years of growth.
Plan storage before you need it
Estimate size from rows, columns and indexes, and project a year ahead. You will order the right disk and avoid a midnight space alert.
More size calculators
Each one has its own calculator, worked examples and answers to common questions.