← Dev Tools

How to Use

1

Enter font size

Type your base font size in pixels. The default is 16px.

2

View results

See line-height values for each ratio from tight (1.15) to golden (1.618).

3

Copy the value

Click on any result to copy the CSS line-height value to your clipboard.

About Line Height Calculator

Line height decides whether long text is comfortable to read or cramped and exhausting. ILikePdf Line Height Calculator turns your font size and measure into recommended line-height ratios, previewing the result on sample text so you can judge it visually. It covers body copy, headings, and the golden-ratio guidance typographers rely on. The calculation runs locally in the browser, and the CSS values copy straight into your stylesheet.

How to calculate line heights Line Height Calculator

Step 1: Enter your font size in pixels.
Step 2: Optionally enter your content width to check line measure.
Step 3: The calculator suggests optimal line-height ratios.
Step 4: Preview the suggested values applied to sample text.
Step 5: Copy the CSS values into your stylesheet.

Common use cases for Line Height Calculator

  • Set readable line heights for body copy.
  • Tune paragraph spacing for long-form reading.
  • Calculate line-height for tight headings.
  • Match your design system's vertical rhythm.

Pro tips

  • Body text typically reads best between 1.5 and 1.7 line-height.
  • Longer line lengths need more line spacing.
  • Calculations happen instantly in your browser.

Was this tool helpful? Rate it

Tap a star to rate.