1. Home
  2. Design tools
  3. Line Height & Measure Calculator

Line Height & Measure Calculator

Pick a font size and a line length in characters, and get the column width and line height that read well.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Line Height & Measure Calculator

  1. Set the font size and line length.
  2. Adjust the line height or snap it to a grid.
  3. Copy the CSS.

Features

  • Column width from characters per line, or the reverse
  • Verdict: short, good, ideal or long measure
  • Starting line heights by font size
  • Optional baseline-grid snapping
  • Live paragraph preview
  • Adjustable average character width

Supported formats

Input

  • Font size and line length

You get

  • Width
  • Line height
  • CSS

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Line Height & Measure Calculator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Characters per line are estimated with an average character width, which varies by typeface.
  • Suggested line heights are starting points.

Guide

Setting line length and line height for readable body text

Text is easier to read when lines are neither too long nor too tight. If a line carries more than about 75 characters the eye loses its place on the return to the next line, and if it carries fewer than 45 the reading rhythm breaks constantly. Line height has its own trade-off: too little makes lines collide, too much makes paragraphs fall apart. This calculator links the two choices so you can pick a column, see how many characters fit and copy the CSS.

From characters to pixels

The number of characters per line is the column width divided by the average width of one character. The page assumes 0.5 em per character, a common figure for text faces, so an 18 pixel font gives 9 pixels per character. A 66 character line is then 66 × 18 × 0.5 = 594 pixels, which is 33 em. Narrow typefaces fit more characters in the same width and wide ones fewer, so adjust the average width for your font; the field accepts values from 0.3 to 0.8 em.

A worked example

Press Sample for an 18 pixel font, 66 characters per line and a line height of 1.5. The page shows a column width of 594 px (33 em), 66 characters per line judged Ideal, and a line height of 1.5 (27 px). The CSS block reads font-size: 1.125rem; /* 18px */, line-height: 1.5; and max-width: 33em; /* about 66 characters */. Using em for the width keeps the column proportional to the text size, so enlarging the font enlarges the column and keeps the same count.

Choosing a line height

Body text between about 12 and 18 pixels suits 1.5, and the page suggests that value. For larger text the ratio can fall: 1.4 at 24 pixels, 1.2 at 40 pixels and 1.1 at 64, because large letters carry their own space. Long lines need more leading than short ones; very wide columns need above 1.5 to help the eye find the next line. Drag the slider from 1 to 2.2 and watch the paragraph, which uses real wrapping.

Snapping to a grid

Some designs align text to a baseline grid, for example 8 pixels. Enter the grid in the last field and the line height in pixels is rounded to a multiple of it. For 18 pixel text at 1.5 the natural height is 27 pixels, which snaps to 24 on an 8 pixel grid; the page then reports the ratio 1.333. A grid of 24 gives 24 as well, and a grid of 0 turns the snapping off.

Accessibility

WCAG 1.4.12 asks that content still works when a reader sets the line height to at least 1.5 times the font size, along with larger paragraph, letter and word spacing. Build text boxes that can grow: avoid fixed heights, clipped overflow and layouts that break when a line wraps one more time. A unitless line-height helps because it follows the font size when users enlarge text.

Edge cases

The count of characters is an estimate; real text with many wide letters such as m and w fits fewer, and text with many narrow ones fits more. Languages with long words need a wider column to avoid awkward breaks. Multi-column layouts and small caption text can use a lower count of around 30 to 40 characters. For code, use the width of a monospace character, which is about 0.6 em, in the average field.

Limits

The calculator does not measure your font, so it cannot be exact. It sets a single paragraph, not headings or lists. The verdict applies to continuous text in one column. Everything runs in your browser.

Checked against the current version of the Line Height & Measure Calculator on .

Troubleshooting

The download did not start

Look for your browser’s download bar or icon. Some browsers ask once before a site may download files; allow it and click the button again.

Frequently asked questions

Why use a unitless line-height?

A unitless number is multiplied by the font size of each element, so child elements with different sizes get proportional spacing. A value in px or em is computed once on the parent and inherited as a fixed length, which can leave headings too tight or too loose.

Is the 66 character ideal fixed?

It is a guideline from typographers such as Robert Bringhurst for single-column text. Narrow columns, captions and multi-column layouts work with fewer characters, and wide-set fonts or short lines of code differ again.

What is the best line length?

For single-column text, 45 to 75 characters per line is comfortable and about 66 is often called ideal, a rule from the typographer Robert Bringhurst.

Keep working with the result

After you download, choose “Save to Workstand” to keep the result in a folder on your computer, attach it to a project and create a follow-up task. It is saved by your browser, not uploaded.