Skip to content
EASE+ ToolsEASE+ Tools

Typography Scale Calculator

Generate a modular type scale in px and rem, with CSS.

Inputs

Example
px

0 to 10.

0 to 5.

px

Usually 16.

Result

Largest size
48.83 px (3.0518 rem)
Smallest size
10.24 px (0.64 rem)
Sizes
8

Some sizes are below 12 px, which many people find hard to read.

CSS custom properties
Type scale
Steppxrem
up-548.833.0518
up-439.062.4414
up-331.251.9531
up-2251.5625
up-1201.25
base161
down-112.80.8
down-210.240.64

About this tool

A modular type scale multiplies a base size by the same ratio at each step, so headings and body text relate to each other consistently. Choose a base size and a ratio, and get every size in pixels and rem, ready to paste as CSS custom properties.

  1. Enter your body text size.
  2. Choose a ratio: smaller ratios suit dense interfaces, larger ones suit editorial pages.
  3. Choose how many steps to generate, then copy the CSS.

Formula

Size at step n = base × ratio^n, for n from −(steps below) to +(steps above). rem = size ÷ root font size.

Worked example

With a 16 px base and a 1.25 ratio, step 2 is 16 × 1.25² = 25 px (1.5625 rem) and step −1 is 16 ÷ 1.25 = 12.8 px.

Assumptions and limits

  • Sizes are rounded to two decimals in px and four in rem.
  • Very small steps below base may be too small to read; keep body text at 16 px or above for most screens.
  • Line height and spacing are not set.

Questions

Which ratio should I use?

1.2 to 1.25 suits most websites and apps. 1.333 and above give dramatic headings for marketing and editorial pages.

Why use rem?

rem sizes follow the reader's browser font-size setting, which helps people who need larger text.

Should mobile use a smaller ratio?

Often yes. Large ratios make top-level headings very big on small screens.