Line height calculator

Line height is font size times a ratio. Around 1.5 is a common choice for body text; headings usually need less.

Features

  • Grid snappingRounds to your baseline unit.
  • PreviewSee a paragraph with the result.
  • Runs in your browserNothing is uploaded and no account is needed.

How to use the line height

  1. Enter font size and ratio.
  2. Set the baseline grid.
  3. Use the unitless value in CSS.

Prefer unitless values

A unitless line-height is recalculated for each element's own font size, so children do not inherit a fixed pixel value.

Frequently asked questions

What does WCAG say?

Content must remain usable when users set line height to at least 1.5.

How long should lines be?

Roughly 45 to 80 characters is a common comfort range.

Is the width exact?

No. It estimates average character width as half the font size.

Related tools