Tested tool guide
Tested browser tools
Checked August 16, 2026
What Vertical Rhythm Calculator does, with a checked example
Typographers keep text on a baseline grid: every line of every size of type lands on the same horizontal lines, so the page reads as one measured system. This tool does that arithmetic. You enter a base unit - the line-height one line of body text occupies, typically 24px - and the font sizes you plan to use, and it returns a line-height and vertical margin for each size, every value a multiple of the base. The surprise is the rounding: a heading can end up with a line-height twice or three times its font size.
Worked example
A concrete input and expected output from the current implementation.
Input
Base line-height: 24px | Body font: 16px | Heading font: 24px | Minimum ratio: 1.5
->
Expected output
Body (16px): line-height 24px (ratio 1.50), margin-bottom 24px
Heading (24px): line-height 48px (ratio 2.00), margin-bottom 24px
16 x 1.5 = 24px is already a multiple of the base, so body text keeps the base line-height, while 24 x 1.5 = 36px is not, so the heading rounds up to the next multiple of 24 - 48px - giving a 2.0 ratio. Every line and margin stays on the 24px grid.