GenerateRandomSearch

Contact Sheet Layout Generator

Laying out a sheet of thumbnails looks like it should be a division, and then the margins and the gutters turn out to be part of the sum too. This takes the margins off, takes every gutter off, and divides what is genuinely left — then adds the whole thing back up against the page to prove the cells fit. Works in millimetres, points or pixels; the arithmetic does not care which, as long as every field uses the same one.

What this generator does

Works out how many rows your image count needs at the chosen column count, subtracts both margins and every gutter from the page, and divides the remainder into cells. The finished layout is added back up against the page size before it is shown.

How to use this tool

  1. Enter the page size in whatever unit you work in.
  2. Set the margin around the edge and the gutter between cells.
  3. Enter how many images you have and how many columns you want.
  4. Read the cell size — the rows are worked out for you.

Understanding the controls

Page width and height
The sheet you are laying out on. Use one unit throughout — millimetres, points or pixels all work, since the calculation is proportional.
Margin
The blank border on all four sides. It comes off twice in each direction before anything else is sized.
Gutter
The gap between neighbouring cells. With four columns there are three gutters, not four, which is where hand calculations usually go wrong.
How many images
How many thumbnails have to fit. The row count follows from this and the columns.
Columns
How many across. Fewer columns means larger cells but more rows, and eventually the rows run out of page.

Common use cases

  • Setting up a photo contact sheet before opening any software
  • Sizing thumbnails for a printed proof sheet
  • Planning a grid of images for a poster or zine page
  • Checking whether a chosen margin leaves usable cells at all
  • Working out how many rows a given column count will need

How this generator works

Rows are the image count divided by the columns, rounded up, so the grid is the shortest one that holds everything. Both margins come off the width and the height, then one gutter for each gap between cells — columns minus one across, rows minus one down. What remains is divided into equal cells at full precision, not rounded, because rounding each cell would drift by a visible amount over a tall grid. Before display the cells, gutters and margins are added back up and checked against the page size, and the grid is confirmed to be the shortest that fits.

Randomness and fairness

Nothing here is random. The layout is determined entirely by the page, the spacing and the image count.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • Assumes every cell is the same size, so a layout with one feature image and smaller supporting ones is a different problem.
  • Cells take whatever shape the page leaves them; if you need a specific cell ratio, size the page or the margins to suit rather than expecting square cells.
  • There is no allowance for captions, headers or a footer — build those into the margin if you need them.
  • Bleed and printer non-printable areas are not modelled; check them against your printer before committing to a tight margin.

Privacy and your data

The calculation runs in your browser and nothing you enter is transmitted, stored or included in analytics.