px to rem converter

At the default 16px root, 24px is 1.5rem. Change the root and everything moves — which is the whole point of rem, and the reason the root size is an input here.

Equivalent

Pixels
rem
em
Points
Percent

px to rem at a 16px root

The default browser root size, and the one almost every design system builds on.

PixelsremPointsTypical use
10px0.625rem7.5ptFine print
12px0.75rem9ptCaption
14px0.875rem10.5ptSmall body
16px1rem12ptBody text
18px1.125rem13.5ptLarge body
20px1.25rem15ptSmall heading
24px1.5rem18ptH3
32px2rem24ptH2
40px2.5rem30ptH1
48px3rem36ptDisplay
64px4rem48ptHero

rem to px at different roots

rem14px root16px root18px root20px root
0.75rem10.5px12px13.5px15px
0.875rem12.25px14px15.75px17.5px
1rem14px16px18px20px
1.125rem15.75px18px20.25px22.5px
1.25rem17.5px20px22.5px25px
1.5rem21px24px27px30px
2rem28px32px36px40px
2.5rem35px40px45px50px
3rem42px48px54px60px

Related calculators

rem is relative to the root, em is relative to the parent

Both units scale, but they scale against different things. One rem is always the font size of the <html> element — 16px unless something changed it — no matter how deeply nested the element is. One em is the font size of the element’s parent, so its meaning changes as you move down the tree.

rem = px ÷ root font size   |   em = px ÷ parent font size

The compounding problem

Because em is relative to the parent, nesting multiplies. A list styled at 0.9em inside another list at 0.9em renders at 0.81em, and a third level at 0.729em. This is the classic bug that produces mysteriously shrinking text several levels deep. rem does not compound, which is why it became the default for type scales and spacing, with em reserved for the cases where you actively want a value tied to the local font size — padding inside a button, for example, so it grows with the label.

Why rem matters for accessibility

A user who sets a larger default font size in their browser is changing the root. Anything sized in rem responds to that; anything hard-coded in px does not, and stays small no matter what the reader asks for. This is the strongest practical argument for rem-based typography, and the reason WCAG’s resize requirements are far easier to satisfy with it.

Points, and where they still apply

A CSS point is defined as 1/72 inch, and a CSS pixel as 1/96 inch, so 12pt is exactly 16px regardless of the actual display. Points belong to print stylesheets; for screens they carry no advantage over px and are best avoided, though they are shown here because design tools and PDFs still use them.

Frequently asked questions

How do I convert px to rem?
Divide the pixel value by the root font size, which is 16px unless it has been changed. So 24px ÷ 16 = 1.5rem.
What is 1rem in pixels?
By default 1rem is 16px, since that is the standard browser root font size. If the root is set to 18px then 1rem becomes 18px.
What is the difference between rem and em?
rem is always relative to the root element font size, while em is relative to the parent element. Nested em values compound and shrink, whereas rem values do not.
Should I use rem or px for font sizes?
rem is generally preferred, because it respects a reader who has increased their browser default font size. Pixel values ignore that setting entirely.
How many pixels is 12pt?
Exactly 16px. CSS defines a point as 1/72 inch and a pixel as 1/96 inch, so points convert to pixels by multiplying by 96/72.

How ListCalc calculates · Report an error

Guides & articles