Line Height Calculator
Calculate optimal line height for readability
Inputs
Provide the following 3 values to run the Line Height Calculator:
- Font Size (px) [number] (required)
- Line Width (characters) [number] — default 65
- Text Type [select] (required)
What it calculates
This tool returns:
- Line Height (px) — primary result
- Ratio
- In em (em)
Worked example
For the sample inputs below:
- Font Size (px): 100
- Line Width (characters): 65
- Text Type: body
the Line Height Calculator produces:
- Line Height: 150 px
- Ratio: 1.50
- In em: 1.50 em
How it works
The result is derived through the following steps:
baseRatios = { body: 1.5, heading: 1.2, ui: 1.3 }baseRatio = baseRatios[textType]widthAdjustment = lineWidth > 75 ? 0.1 : lineWidth < 45 ? -0.1 : 0optimalRatio = baseRatio + widthAdjustmentlineHeight = fontSize * optimalRatio
Frequently Asked Questions
What is line height and why is it important?
Line height is the vertical spacing between lines of text. It greatly impacts readability, making text easier to read and understand.
How do I use the Line Height Calculator?
Simply enter your font size and the calculator will suggest optimal line height for improved readability based on typographic best practices.
What is the ideal line height for my text?
The optimal line height typically ranges from 1.2 to 1.6 times the font size, but our calculator will provide specific recommendations based on your input.
Can I use the Line Height Calculator for different languages?
Yes, the calculator can be used for various languages as long as the text is properly formatted and the font supports the language characters.
Is the Line Height Calculator free to use?
Absolutely! The Line Height Calculator is completely free and easy to use for all your design needs.