Grid Column Calculator
Enter your container width, column count, gutter size, and margin to get exact CSS grid column widths and a visual preview.
Grid Settings
—
Column Width
—
Total Gutter
—
Content Width
—
Column %
Grid Preview
(scaled to fit)Common Span Widths
| Span | Width (px) | Width (%) | Fraction |
|---|
Generated CSS
Copied!
Summary
Enter your container width, column count, gutter size, and margin to get exact CSS grid column widths and a visual preview.
How it works
- Enter your container width in pixels.
- Set the number of columns you need.
- Define the gutter size (space between columns).
- Set the left and right margin (outer padding) if any.
- The calculator instantly shows the column width and generates copy-ready CSS.
Use cases
- Calculate exact column widths before writing CSS grid layout code.
- Convert a design comp (e.g. 12-column 1440px) into pixel values for development.
- Verify gutter and margin math before committing a layout to a design system.
- Compare different column counts to find the best fit for a content area.
- Generate a CSS snippet to paste directly into a stylesheet.
- Prototype breakpoint grids quickly without manual arithmetic.
Frequently Asked Questions
Last updated: 2026-07-01 ·
Reviewed by Nham Vu