Long lines tire the eye, and very short ones break up sentences. The line length calculator takes the font size, a target number of characters per line, the average character width and the width of your text column to give the ideal column width, the characters per line in your column, the words per line and a note on whether the length reads well.
How the calculation works
- Ideal column width = target characters per line × average character width × font size. Readers are most comfortable with about 45 to 75 characters per line, and 66 is often quoted as the ideal.
- Average character width is a share of the font size. For most body fonts it is about 0.5 em, so a 16 px font has characters about 8 px wide. Wide fonts are nearer 0.55 and narrow ones 0.45.
- Characters per line in your column = column width ÷ (average character width × font size).
- Words per line = characters per line ÷ 6, since an average English word takes about 5 letters and a space.
Example
For a 16 px font with characters about 0.5 em wide, the ideal width for 66 characters is 66 × 0.5 × 16 = 528 px, or 33 em. A text column that is 700 px wide holds 700 ÷ (0.5 × 16) = 87.5 characters per line, which is too long for comfortable reading, and about 14.6 words per line. To fix it, narrow the column to about 530 px or raise the font size.
Why it matters
Line length is one of the simplest ways to make a page more readable, and it costs nothing. It matters for articles, documentation, emails, books and slides, and it is a first thing a web designer checks when text looks tiring.
Good to know
The rule of 45 to 75 characters is a guide and not a law. Larger line spacing allows longer lines, and shorter lines suit captions or narrow sidebars. Fonts differ, so measure your own if the layout is important. For languages with long words, such as German, or with wider characters, expect fewer characters per line at the same width.
Related tools
The golden ratio calculator gives proportions for page layout and the print size calculator relates the pixels of an image to the size of a print.