Skip to content
ENExplore Calculators

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

  1. 1Values used
  2. 2Row size
  3. 3Estimated row size= 208
  4. 4Column data= 176
  5. 5Alignment padding= 5
  6. 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.

Row Size Estimate Calculator | Calcrivo