Row Size Estimate Calculator
Work out row size estimate instantly with clear inputs, formula shown and shareable results.
About Row Size Estimate Calculator
Row size is the sum of column widths plus a header and null bitmap, rounded up to an alignment boundary. Rows per page follows directly, and that is the number that determines scan cost: halving row size doubles rows per page and therefore halves the pages a full scan must read.
Formula
Row size
data = 4 x int columns + 8 x bigint columns + text bytes; total = data + header + alignment padding; rows per page = floor((page size - page header) / row size)
Worked example
With the default values below, Row Size Estimate Calculator returns Estimated row size of 208 B. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Integer columns (4 bytes)minimum 0
- 6
- Bigint / timestamp columns (8 bytes)minimum 0
- 4
- Average bytes across text columnsminimum 0 bytes
- 120 bytes
- Row header and presence bitmapminimum 0 bytes
- 27 bytes
Results
- Estimated row size
- 208 B
- Column data
- 176 B
- Alignment padding
- 5 B
- Rows per 8 KB page
- 39
Step by step
- 1Values used
- 2Row size
- 3Estimated row size= 208
- 4Column data= 176
- 5Alignment padding= 5
- 6Rows per 8 KB page= 39
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
Does column order really matter?
In PostgreSQL yes. Placing wider fixed-width types first reduces alignment padding, occasionally saving several bytes per row across billions of rows.
What happens to very large values?
They are moved out of line — TOAST in PostgreSQL, overflow pages in InnoDB — so the row itself stays small but reading that column costs an extra fetch.
Related Calculators
- Index Size Estimate Calculator
- Table Size Estimate Calculator
- Cache Size For Hit Ratio Calculator
- COCOMO Effort Estimate Calculator
- Connection Pool Size Calculator
- Container Image Size Savings Calculator
- Function Point Estimate Calculator
- Lines Of Code Estimate Calculator
- Lock Contention Estimate Calculator
- Restore Time Estimate Calculator
You might also need
- Index Size Estimate CalculatorAlso in DevOps, SRE & Performance
- Table Size Estimate CalculatorAlso in DevOps, SRE & Performance
- COCOMO Effort Estimate CalculatorAlso in DevOps, SRE & Performance
- Connection Pool Size CalculatorAlso in DevOps, SRE & Performance
- Function Point Estimate CalculatorAlso in DevOps, SRE & Performance
- Lines Of Code Estimate CalculatorAlso in DevOps, SRE & Performance
