Skip to content
hateitall

8pt Grid and Column Calculator

Keep sizes on your grid and find column layouts that do not end in awkward fractions.

Processed locallyIn: NumberOut: Number, CSS

Loading tool…

How to use 8pt grid and column calculator

  1. Set the grid unit, 8px by default.

  2. Type a list of sizes to see each one snapped to the nearest, lower and higher grid value.

  3. Enter a container width, column count, gutter and margin, or pick a layout preset.

  4. Read the column and span widths, try a suggested width, then copy the CSS grid.

What this tool does

  • Snaps any number of values to the grid three ways and marks those already on it.
  • Calculates column width and the width of every span, with its share of the content.
  • Warns when columns are not a multiple of the grid unit and suggests container widths that fix it.
  • Writes a CSS grid with the matching container and column gap.

How the result is verified

Column width is (container minus both margins minus all gutters) divided by the column count. The span table adds back the gutters, so the widest span always equals the content width.

Frequently asked questions

What is an 8pt grid?

A rule that every size and space is a multiple of 8. It limits choices, keeps layouts aligned and divides cleanly at common screen densities.

Do column widths have to be on the grid?

Not strictly, since columns stretch with the screen. But at your main design width, whole grid columns make spans and nested spacing line up, which is why the tool suggests widths that achieve it.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Spacing tokens from a base unit, ratio or list as CSS, Tailwind or JSON

Number→ CSS custom propertiesLight on device

px, rem and em both ways with any root size, plus bulk CSS rewrite

Number · CSS→ NumberLight on device