Calcoid

Rem to Px Converter

Convert rem to px and px to rem at any root font size, with a quick reference table mapping common rem values to pixels.

Rem to Px Converter

The html element font-size. Browsers default to 16 px. Set it to 10 px for the 62.5% trick.

1.5 rem equals

24 px

At a root font size of 16 px.

Pixels

24 px

Rem

1.5 rem

Root font size

16 px

Quick reference (root 16 px)

Common rem values mapped to pixels at your current root size.

RemPixels
0.25 rem4 px
0.5 rem8 px
0.75 rem12 px
1 rem16 px
1.25 rem20 px
1.5 rem24 px
1.75 rem28 px
2 rem32 px
2.5 rem40 px
3 rem48 px

Frequently Asked Questions about the Rem to Px Converter

How do you convert rem to px?
Multiply the rem value by the root font size in pixels. With the browser default root of 16 px, 1 rem equals 16 px, 1.5 rem equals 24 px, and 2 rem equals 32 px. If your page sets a custom html font-size, enter that number as the root size to get an exact result.
How do you convert px to rem?
Divide the pixel value by the root font size. At the default 16 px root, 24 px equals 1.5 rem and 10 px equals 0.625 rem. Because the formula is rem = px divided by root font size, a smaller root yields a larger rem number for the same pixels.
Why does 1 rem equal 16 px?
Browsers set the root element (html) font-size to 16 px by default, and 1 rem always equals that root size. So unless a stylesheet changes html { font-size }, 1 rem resolves to 16 px. Change the root font size field here to match your own CSS and every conversion updates instantly.
What is the 62.5% (10 px root) trick?
Setting html { font-size: 62.5% } makes the root 10 px, since 62.5% of 16 px is 10 px. After that, rem math is easy: 1.6 rem is 16 px, 2.4 rem is 24 px, and any pixel value divided by 10 gives the rem. Set the root font size to 10 px above to see this mapping in the reference table.
What is the difference between rem and em?
Rem is always relative to the root (html) font-size, so it stays consistent no matter where the element sits in the document. Em is relative to the font-size of the parent element, which can compound when elements nest. This tool converts rem, which depends only on the single root size, not on any parent context.
Should you use rem or px for font sizes?
Rem scales with the reader's browser font-size preference, so text sized in rem respects accessibility settings and zoom. Pixels stay fixed regardless of that preference. Many designs size fonts and spacing in rem for accessibility while keeping borders and hairline details in px.

Related Calculators

More calculators in "Tech"

See all 98 calculators in "Tech"