Line Height Calculator
v1.0Line Height Calculator recommends a comfortable line-height for a font size and a line length, with an acceptable range on either side instead of one "right" answer.
Give it a font size and a measure: characters per line, or a container width it converts to a character count. The recommendation starts from 1.5 and adjusts for three things. Bigger type wants tighter leading. A line longer than the classic 66 characters wants more, and a shorter one wants less. A Compact, Normal or Loose typeface feel stands in for x-height, which no formula can know. Why this number? opens the breakdown, with each term's signed value, a one-line reason, and a sum that matches the headline number, including when the result is clamped to the 1.0 floor.
The preview shows your own text at the chosen size, width and line-height, and a rhythm overlay draws a guide line at every line-height step. The line-height field next to the recommendation can be overridden by hand, and Use recommended puts it back. The Sample menu loads four starting points: body copy at 18px, small interface text, a 56px headline, and a wide 960px column. Each also clears any manual override.
The CSS output is a font-size and line-height pair, with the line-height as unitless, px or rem, and Copy puts it on the clipboard. Every input is remembered on this device, and Share packs the whole state into a link.