Baseline Grid Calculator
Enter your font size and line height to generate a baseline grid with vertical rhythm values for consistent typography.
Grid Settings
Recommended: 1.4–1.6 for body text
Grid Metrics
Baseline Unit
—
Line Height
—
Grid Aligned
—
Half Unit
—
Type Scale
Click Calculate Grid to see the type scale.
Grid Preview
Click Calculate Grid to preview.
CSS Variables
/* CSS will appear here after calculation */
Summary
Enter your font size and line height to generate a baseline grid with vertical rhythm values for consistent typography.
How it works
- Enter your base font size in pixels (e.g. 16px for body text).
- Set a line height multiplier — 1.5 is a comfortable default for body copy.
- Optionally adjust the number of grid lines to preview.
- The calculator derives the baseline unit and suggests heading sizes that align to the grid.
- Copy the generated CSS variables and paste them into your stylesheet.
Use cases
- Establishing vertical rhythm before starting a new web or print project.
- Debugging inconsistent spacing in an existing design system.
- Generating CSS custom properties for a design-token-based stylesheet.
- Choosing harmonious heading scale values that align to a base grid.
- Teaching students how baseline grids and vertical rhythm work.
- Checking whether a chosen line height produces whole-pixel grid values.
- Documenting type specifications for a style guide or handoff to developers.
Frequently Asked Questions
Last updated: 2026-06-09 ·
Reviewed by Nham Vu