TinyCalc

Image Grid Layout

Rows, cell size and total height for an N-image grid.

px
px
Resulttinycalc.net
cell = (width − (cols − 1) × gap) ÷ cols · rows = ⌈images ÷ cols⌉

How it works

Each cell gets the container width minus the gaps, divided by the column count: (1200 − 3 × 16) ÷ 4 = 288 px for a 4-column grid. 23 images then need ⌈23 ÷ 4⌉ = 6 rows, with 3 images in the last one. Handy for planning galleries, mood boards and contact sheets.

Related calculators