Free CSS grid calculator for web designers

Build clean layout grids instantly.

Choose columns, gap and container width. Preview your CSS grid and copy clean code for websites, landing pages and design systems.

Columns12
Gap24px
Column78px

Website grids

Use 12 columns for flexible homepages, landing pages and portfolio layouts.

Responsive rhythm

Adjust gaps and container width to create calm spacing across screen sizes.

Clean CSS

Copy a simple grid snippet and adapt it directly in your project.

What is a grid calculator?

A grid calculator helps you create structured layouts with consistent columns and spacing. It is useful for websites, landing pages, dashboards, portfolios and design systems.

CSS Grid makes it easier to divide a layout into columns. Set the number of columns, adjust the gap and copy the CSS directly into your project.

Use this tool when you want your layout to feel organised, responsive and easier to build.

The grid: invisible, and still everywhere

You do not see a good grid.
You feel it. Things line up. The page is calm. The eye knows where to go.

A grid is not a cage. It is a set of agreements. Once they are made, you can stop deciding the same things again and again.

✦ The parts of a grid

  • Columns. The vertical spaces where content goes.
  • Gutters. The gaps between columns. They give content room to breathe.
  • Margins. The space around the whole layout.
  • Rows and baseline. The horizontal rhythm, often linked to the line height of your text.

✦ Why twelve columns?

Twelve can be divided by 2, 3, 4 and 6.
That gives you halves, thirds, quarters and sixths in one system.

For a simple site, four or six columns can be enough. For print, many designers start from the page and the text column, not from a fixed number.

✦ How to use this calculator

  1. Set the container width with the slider.
  2. Choose the number of columns and the gap between them.
  3. Read the exact column width.
  4. Copy the CSS grid settings or use the numbers in your design software.
  5. Test with real content: a long headline, an image, a short caption.

✦ A little history

The modern grid grew in Swiss design of the 1950s and 60s. Designers like Josef Müller-Brockmann wrote it down as a method in Grid Systems in Graphic Design (1981).

The idea was simple and radical. Order is not boring. Order makes freedom possible.
It still works. Every web framework is built on it.

✦ Breaking the grid

Sometimes one element steps outside the grid. A large image. A quote.
That only works if everything else follows the grid. The exception needs a rule to be an exception.

✦ Common mistakes

  • Gutters that are too small. Content starts to touch.
  • A different grid on every page.
  • Using the grid for boxes, but not for text.
  • Forgetting mobile. Twelve columns become one. Plan that from the start.

✦ In practice

A portfolio website. Twelve columns on desktop. Project images span six columns each, two per row. Text spans eight, so lines do not get too long.
On a phone everything becomes one column. The order stays the same.

A magazine spread. Two pages, each with three columns. A large photo takes two columns and bleeds off the edge. The text flows through the rest.
Captions sit in one narrow column. The grid holds it all together.

A dashboard. A twelve-column grid with small gutters. Cards span three, four or six columns. Everything aligns, even when the content changes daily.
Order makes numbers easier to read.

✦ Four questions before you set it up

  1. What do you want to say? Calm and structured, or dynamic? Fewer columns feel calmer.
  2. What must be seen first? That element may take the most columns.
  3. What can go? Extra boxes and lines. A good grid needs no visible borders.
  4. What is the next small step? Place one real page in the grid. Adjust. Then do the rest.

✦ A small checklist

  • Column, gutter and margin sizes are written down.
  • Body text never spans the full width on large screens.
  • Images and text start on the same column lines.
  • There is a plan for tablet and phone.
  • Spacing between sections follows a fixed step, not guesswork.

✦ From the classroom

We give students a newspaper page and a marker. Draw the grid you see.
After ten minutes everyone sees it. After that, they never stop seeing it.

Frequently asked questions

What is CSS Grid?

CSS Grid is a layout system in CSS that lets you create rows and columns for web layouts.

How many columns should I use?

12 columns are common for web design because they divide easily into halves, thirds and quarters. Smaller layouts may work well with 4, 6 or 8 columns.

What is a grid gap?

The grid gap is the space between columns or rows. Consistent gaps help your layout feel calm and organised.

Copied CSS