Grid calculator. Work out column widths from your page width, columns, gutters and margins.

How it works

  1. Set the page

    The container width and the margins on each side.

  2. Set the columns

    How many columns and how wide the gutters between them are.

  3. Copy the grid

    Exact column widths and the CSS grid that produces them.

Questions

How many columns should I use?

12 divides into halves, thirds and quarters, which is why it's common on the web. Phones usually use 4.

Should gutters scale with the screen?

Often, yes. Many layouts use 16px gutters on phones and 24 to 32px on desktop.

More design tools

  • Spacing scale: Spacing steps on a 4 or 8 point grid.
  • Aspect ratio: Missing widths and heights for any ratio.
  • Fluid type: A CSS clamp() value that scales text between two screens.