Skip to content
Dozo Tools

rem = px / root

px to rem converter

Rem, px, and em

Edit any field. Rem uses the root font size. Em uses the parent font size.

Base sizes

Used for rem. Browsers start at 16.

Used for em. Matches rem while this equals the root.

Start typing a value in any field above.

Copies the pixels field.

Common sizes

Start typing a value.

At the browser default of 16px, 16px is 1rem, 24px is 1.5rem, and 18px is 1.125rem.

A root of 10px is what people mean by 62.5% of 16px. Then 16px is 1.6rem and 24px is 2.4rem. Type 10 in the root field or the page still uses 16. The parent field changes em only.

Common px lengths in rem at a 16px root
pxrem (root 16px)
80.5
100.625
120.75
140.875
161
181.125
201.25
241.5
322

Also see rem to px, em to px, and px to em. The other unit groups are on Units.

Questions

How do you convert px to rem?

Divide the pixel length by the root font size. rem = px / root. 24px at a 16px root is 1.5rem.

What is 16px in rem?

1rem when the root is 16px. If the root is 10px, 16px is 1.6rem.

What does a 62.5% root change?

62.5% of the usual 16px default is 10px on html. Then rem = px / 10. Type 10 in the root field or this page still uses 16.

Does rem follow the parent?

No. rem uses the html font size. The parent field changes em only.