Skip to content
Type & Text

Line Height Calculator

Line height calculator: get readable line heights for any font size as a unitless ratio, pixels or percent, with a live preview.

  • #line height calculator
  • #css line height
  • #leading calculator
  • #line height
  • #leading
  • #css
  • #readability
  • #typography
100% client-side

Runs in your browser. Your data never leaves this device.

The Workbench
Line Height Calculator — workspaceLive
px
Recommended
24.0px
1.5× ratio — optimal for body text
Golden Ratio
25.9px
φ (1.618) — harmonious proportions
Tight1.2×
Headings, large text
19.2px
Snug1.375×
Subheadings
22.0px
Normal1.5×
Body text (recommended)
24.0px
Relaxed1.625×
Long-form reading
26.0px
Loose2×
Large blocks, accessibility
32.0px
1.2× line-height

The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.

1.5× line-height

The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.

2× line-height

The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.

Network requests0
Bytes uploaded0
Trackers fired0
The Guide

About Line Height Calculator

/01 Setting line height that is actually readable

Line height controls the vertical space between lines of text, and it is the single biggest lever on whether a paragraph feels comfortable or cramped. Too tight and lines visually merge; too loose and the eye loses its place returning to the left margin.

This calculator takes your font size and suggests line heights in unitless, pixel and percentage form, so you can see the same value in whichever notation your stylesheet uses.

/02 Why unitless values are the safe default

A unitless line-height like 1.5 is a multiplier: children inherit the ratio and recompute against their own font size. Set line-height in px instead and children inherit the fixed pixel value, so a heading nested inside can end up with lines overlapping.

As a rule of thumb, body copy sits around 1.4 to 1.6, large headings tighten towards 1.1, and long measures need more room than short ones. WCAG asks for at least 1.5 within paragraphs for body text.

/03 Using a line height calculator

Line height is font size multiplied by a ratio. At 16px with a ratio of 1.5, lines sit 24px apart; at 18px with 1.6 they sit 28.8px apart. A line height calculator does that multiplication for any size and shows the result three ways: the unitless ratio you should normally put in CSS, the pixel value designers hand over, and the percentage some tools still use.

The named presets give you a sensible starting point for each job. Tight and snug suit large headings, where lines already look far apart. Normal and relaxed suit body text and long-form reading. Loose helps large blocks of text and readers who need more space between lines. There is also the golden ratio, 1.618, a popular choice for comfortable long reads. Every option renders in the preview, so you can judge by eye before copying a value.

/04 CSS line height, Tailwind and accessibility

In CSS, line-height: normal is not a fixed value. Browsers use the font's own metrics, usually around 1.2, which is why swapping fonts can quietly change your spacing. Setting an explicit unitless value such as 1.5 removes that surprise.

Tailwind's leading utilities map onto these same ratios: leading-tight is 1.25, leading-snug 1.375, leading-normal 1.5, leading-relaxed 1.625 and leading-loose 2. For accessibility, WCAG asks that content still works when users increase line height to 1.5 times the font size, and its enhanced guidance recommends at least 1.5 within paragraphs by default.

FAQ

Questions about Line Height Calculator.

What line height should body text use?
Roughly 1.5 for a typical measure. Longer line lengths need more leading to help the eye track back to the start of the next line; short, narrow columns can go tighter without hurting readability.
Why do my headings look too spaced out?
They are probably inheriting a body line height. Large text needs proportionally less leading — set headings somewhere between 1.05 and 1.25 rather than letting them take the paragraph value.
Is line-height the same as leading?
Nearly. Leading in print measures baseline to baseline; CSS line-height distributes the extra space above and below the text box. The practical effect is the same, but a converted print value will not always look identical on screen.
How do I calculate line height in pixels?
Multiply the font size by the line height ratio. 16px text at 1.5 gives 24px, and 20px text at 1.4 gives 28px. In CSS, prefer writing the unitless ratio, which scales automatically if the font size changes.
What does line-height: normal mean in CSS?
It tells the browser to use a value built into the font, typically around 1.2 but different for every typeface. Because it changes with the font, an explicit value such as 1.5 gives more predictable spacing.
What are Tailwind's line height values?
leading-tight is 1.25, leading-snug 1.375, leading-normal 1.5, leading-relaxed 1.625 and leading-loose 2. Numbered classes such as leading-6 set a fixed height instead, 1.5rem or 24px in that case.
Related
PX to REM Converter

Convert px to rem and rem to px against any root font size, with a quick reference table of common pixel values.

px to remrem to pxtailwind rem
Typography Calculator

Convert points to mm, inches, picas, ciceros, agates, pixels and rem, for print and screen typography, with a quick reference.

points to mmpt to pxpica to inches
Glyph Browser

Browse and copy Unicode characters: symbols, arrows, currency, maths, emoji and more, searchable by name or code point.

unicode charactersspecial characterssymbols copy paste
Word Counter

Free online word counter for words, characters, sentences and paragraphs, with reading and speaking time, updated as you type.

word countercharacter counterspeaking time
Large Type

Show big text on your screen: blow a short password, code or message up to read across a room, with look-alike characters colour-coded.

big textlarge text displayshow text on screen
Text Editor

Free online text editor for Markdown with live formatting, tables, footnotes, focus mode, and export to Markdown, HTML or PDF.

online text editormarkdown editor onlinedistraction free writing
Text Scratchpad

Online notepad that saves in your browser, with tools to change case, sort, remove duplicates, find and replace, and clean up text.

online notepadtext case converterremove duplicate lines
Font File Explorer

Online font viewer: open a TTF, OTF, WOFF or WOFF2 file to preview it at any size with your own text and get ready-to-use CSS, without installing it.

font viewerttf viewerotf viewer
Shavian Transliterator

Shavian alphabet transliterator: convert English text into Shavian script, with alternate spellings for words pronounced more than one way.

shavian alphabetenglish to shavianshavian translator
Text Diff

Online text compare tool: paste or open two versions and see every added and removed line highlighted side by side. Nothing is uploaded.

text comparecompare two textscompare text files