Typography
  • Free forever
  • No sign-up
  • Instant results

Line Height Calculator

Convert a pixel line height to a unitless CSS ratio. Unitless line-height scales correctly when font size changes and this calculator gives you the right value along with practical readability advice.

Unitless ratio

When would you use this?

CSS line-height is one of those properties where unitless values are almost always better than pixel values. They scale proportionally when the font size changes, which is exactly what you want. But most design files show line heights in pixels, not as ratios. This calculator takes both values and converts them, plus gives you a quick steer on whether the ratio is appropriate for headings, body text, or display type.

Common Questions

Why should I use unitless line-height?

What's a good line-height for body text?