PX to REM & EM Converter — CSS Unit Calculator | CalcGrid
PX to REM & EM Converter
Bidirectional CSS pixel to rem / em converter with configurable root size.
CSS Value
1.5rem
24px ÷ 16px root = 1.5rem (1.5em)
PX ↔ REM Quick Reference Table
| Pixels | REM / EM | CSS Snippet |
|---|---|---|
| 4px | 0.25rem | font-size: 0.25rem; |
| 8px | 0.5rem | font-size: 0.5rem; |
| 12px | 0.75rem | font-size: 0.75rem; |
| 14px | 0.875rem | font-size: 0.875rem; |
| 16px | 1rem | font-size: 1rem; |
| 18px | 1.125rem | font-size: 1.125rem; |
| 20px | 1.25rem | font-size: 1.25rem; |
| 24px | 1.5rem | font-size: 1.5rem; |
| 32px | 2rem | font-size: 2rem; |
| 40px | 2.5rem | font-size: 2.5rem; |
| 48px | 3rem | font-size: 3rem; |
| 64px | 4rem | font-size: 4rem; |
Frequently Asked Questions
What is the difference between REM and EM in CSS?
REM (Root EM) always scales relative to the root <html> font-size (16px by default in browsers). EM scales relative to the current element or parent font-size, which can compound inside nested elements.
Why use REM instead of PX for typography and spacing?
Using REM respects a user’s browser accessibility font-size preference (such as increasing default text from 16px to 20px), keeping layouts proportional.
What is 24px in REM when root font-size is 16px?
24 ÷ 16 = 1.5rem. In Tailwind CSS spacing scale, 1.5rem corresponds to p-6 or text-2xl.
Can I change the base root font-size from 16px?
Yes. Update the Root Font Size field (for example to 10px if using the 62.5% html reset pattern, or 18px) and the converter + reference table update immediately.