Convert PX to REM

Convert pixels to rem instantly. Default base: 16px. Includes conversion table and formula. Free online CSS unit calculator.

Formula: rem = px ÷ root font size (default 16px)

Quick example: 24px ÷ 16 = 1.5rem

Value
Unit
px
px
px
px
pxSource
16px
rem
1rem
em
1em
vh
1.4815vh
vw
0.8333vw
Visual Preview
16px

About This Conversion

Converting pixels to rem is essential for building accessible, responsive websites. REM units scale with the user's browser font size preference, making your layout respect accessibility settings. The conversion formula is simple: divide the pixel value by the root font size (typically 16px). For example, 24px becomes 1.5rem, 32px becomes 2rem, and 14px becomes 0.875rem. Using rem for font sizes, padding, and margins ensures your layout scales proportionally when users adjust their default font size for readability.

Frequently Asked Questions

What is the formula to convert PX to REM?
REM = pixel value ÷ root font size. With the default 16px root, divide pixels by 16. For example: 24px ÷ 16 = 1.5rem.
Why should I use REM instead of PX?
REM scales with the user's browser font size setting, respecting accessibility preferences. PX is fixed and ignores user settings. Using rem ensures your site is accessible to users who need larger text.
What if my root font size isn't 16px?
If you've set html { font-size: 62.5% } (making 1rem = 10px), or any other base, enter your custom root size in the converter for accurate results.

Related CSS Conversions