Convert pixels to REM and REM to pixels instantly. Set your base font size for accurate results.
Divide the pixel value by your base font size. With a base of 16px: 24px ÷ 16 = 1.5rem. The formula is simple: REM = PX ÷ Base Font Size.
REM (Root EM) units scale relative to the root element's font size, making your layouts accessible and responsive. When users change their browser font size, REM-based layouts adapt correctly — PX-based layouts do not.
Most browsers default to 16px. So 1rem = 16px by default. If your CSS sets html { font-size: 62.5% }, then 1rem = 10px, which makes calculations easier.