Skip to content

How many rem is that many pixels?

At the default 16 px font size, rem = px ÷ 16: 24 px is 1.5 rem.

px

Result

1.5 rem

24 pixels equals 1.5 rem

  • The other way round: 1 rem = 16 px.

In all units

Pixels
24 px
Root ems
1.5 rem
Ems
1.5 em
Points
18 pt
Picas
1.5 pc
Inches
0.25 in
Centimetres
0.635 cm
Millimetres
6.35 mm
Quarter-millimetres
25.4 Q

Sponsored Links

At the default 16 px font size, rem = px ÷ 16: 24 px is 1.5 rem.

How to use

  1. Type the length you want to convert.
  2. Choose the units to convert from and to.
  3. Set the font size that 1 rem or 1 em stands for: 16 px unless your stylesheet changes it.

px → rem

pxrem
80.5
120.75
161
241.5
322
483

At a root font size of 16 px.

How it works

CSS has absolute lengths, fixed to each other, and font-relative ones. In CSS, an inch is always 96 px, so 1 pt (1/72 in) is 4/3 px, a pica is 16 px and 1 cm is about 37.8 px. These CSS pixels are not the screen's physical pixels; the browser scales them.

A rem is the font size of the root element and an em the font size of the element itself. Browsers default to 16 px, so rem = px ÷ 16 and 24 px = 1.5 rem. If your root font size is 20 px, 24 px is 1.2 rem. The converter uses the one font size you set for both, so for em, give the size that applies to that element.

The definitions come from the W3C CSS Values and Units Module Level 4. Viewport and container units (vw, vh, cqw) depend on the screen and are not included.

Sponsored Links

Frequently asked questions

How do I convert px to rem?

Divide the pixels by the root font size: at 16 px, 32 px ÷ 16 = 2 rem.

Should I use rem or px for font sizes?

rem follows the font size a reader sets in the browser, so text in rem scales for people who need larger text.

Sponsored Links

Sponsored Links