PX to REM Converter

A free px to rem converter and rem to px calculator. Type a pixel value, set your root font size, and copy the rem value straight into your CSS. Need rem to px instead? Switch the converter to REM to PX, or use the tables below.

How to Convert PX to REM

Quick answer: 1rem = 16px when the root (html) font size is 16px, which is the browser default. If a site sets the root to 10px, 1rem is 10px.

The formula: rem = px ÷ root font size, and px = rem × root font size. So 24px ÷ 16 = 1.5rem, and 1.25rem × 16 = 20px. The converter below does both directions for any root size, and you can copy the result straight into your CSS.

rem vs em: rem always follows the root font size, so 1.5rem is the same size everywhere on the page. em follows the parent element, so it compounds when you nest elements. Need em values instead? Use my PX to EM converter.

PX to REM Converter

formula: px ÷ root font size = rem

Conversion direction
Result1rem

16px ÷ 16px = 1rem

Agencies: I take WordPress overflow work. See white label support

PX to REM conversion table (16px root)

Browsers start with a 16px root font size, so these are the values I reach for most. Each one is px ÷ 16.

PX to REM conversion at a 16px root. Using a different root? Put it in the converter above.
PixelsREM
8px0.5rem
10px0.625rem
12px0.75rem
14px0.875rem
16px1rem
18px1.125rem
20px1.25rem
24px1.5rem
28px1.75rem
32px2rem
36px2.25rem
40px2.5rem
48px3rem
56px3.5rem
64px4rem
72px4.5rem

REM to PX conversion table (16px root)

Going the other way, multiply by the root: rem × 16 = px.

REM to pixel shortcut: rem × root font size = px.
REMPixels
0.25rem4px
0.5rem8px
0.625rem10px
0.75rem12px
0.875rem14px
1rem16px
1.125rem18px
1.25rem20px
1.5rem24px
1.75rem28px
2rem32px
2.5rem40px
3rem48px
4rem64px
5rem80px

Same values at other root sizes

Each value is px ÷ root, rounded to 3 decimals. A 10px root is the common 62.5% setup.
PXRoot 10pxRoot 12pxRoot 14pxRoot 18pxRoot 20px
12px1.2rem1rem0.857rem0.667rem0.6rem
14px1.4rem1.167rem1rem0.778rem0.7rem
16px1.6rem1.333rem1.143rem0.889rem0.8rem
18px1.8rem1.5rem1.286rem1rem0.9rem
24px2.4rem2rem1.714rem1.333rem1.2rem
32px3.2rem2.667rem2.286rem1.778rem1.6rem

FAQ

Frequently Asked Questions

How many pixels is 1rem?

At the default browser font size, 1rem is 16px. Rem follows the root (html) font size only, so if a site sets the html element to 18px, 1rem is 18px everywhere on the page.

Multiply the rem value by the root font size. 1.25rem at a 16px root is 1.25 × 16 = 20px. At an 18px root, the same 1.25rem is 22.5px.

Divide the pixel value by the root font size. 24px ÷ 16px = 1.5rem. The converter above does this for any root size, and the table covers the common sizes.

Rem is relative to the root (html) font size, so it is the same size wherever you use it. Em is relative to the font size of the parent element, so it compounds when you nest elements. I use rem for most font sizes and em for spacing that should grow with its own text, like button padding.

Use 16px unless your site changes the font size of the html element. You can check it in your browser’s dev tools. If the html font size is 62.5%, the root is 10px, so set the root to 10 in the converter.

Setting html { font-size: 62.5%; } makes the root 10px at the browser default, so 1rem = 10px and 24px = 2.4rem. The maths gets easy, but you then have to size body text back up, for example 1.6rem for 16px text.

Rem scales with the visitor’s browser font setting. If someone sets a bigger default text size, rem sizes grow with it and px sizes don’t. That makes your site easier to read for more people.

Yes. Every current browser supports rem, including Chrome, Safari, Firefox and Edge on desktop and mobile.

Need a developer, not just a converter?

I build and look after WordPress sites every month: updates, backups, speed and small CSS fixes like this one. Plans start at $169 USD a month.

Want to check your site’s speed first? Get my free website check