Enter a pixel value and get the rem equivalent instantly, using whatever root font size your project sets (16px by default). Because rem scales with the user's browser font setting, converting fixed px values to rem keeps typography and spacing accessible and responsive. The table below lists the most common px-to-rem values at a 16px base so you can copy them straight into your CSS.
| Pixels | REM |
|---|---|
| 4px | 0.25rem |
| 8px | 0.5rem |
| 12px | 0.75rem |
| 14px | 0.875rem |
| 16px | 1rem |
| 18px | 1.125rem |
| 20px | 1.25rem |
| 24px | 1.5rem |
| 32px | 2rem |
| 40px | 2.5rem |
| 48px | 3rem |
| 64px | 4rem |
Rem (root em) makes typography and spacing scale with the user's browser font-size preference, which is essential for accessibility. A user who has bumped their default font size up to 20px (because of low vision, for example) will see your whole layout scale proportionally if you size in rem instead of px. Sites that hardcode 14px text remain stuck at 14px no matter what the user does. Switching to rem also makes responsive resizing trivial — change the html font-size at a breakpoint and the whole UI rescales.
Browsers default the root font-size to 16px, so 1rem = 16px out of the box. Many designers use this assumption — multiples of 16. Some teams set the html element to font-size: 62.5% (which makes 1rem = 10px) so the math is easier: 24px = 2.4rem, 12px = 1.2rem. This calculator lets you change the base in the field above to match your project. The default of 16 covers most setups.
Use rem for font-size, padding, margin, gap, max-width, and border-radius — anywhere a user-controlled scale should apply. Use px for borders (1px hairlines), box-shadow blur, and a handful of pixel-perfect details. For element widths and breakpoints, em (relative to the element's own font-size) is sometimes a better fit. Avoid using rem for media-query widths in older browsers; modern browsers handle it fine.
Exact to four decimal places — more than enough for any CSS use case (browsers round subpixel values to fractions of a logical pixel anyway). At the default 16px base, 1px = 0.0625rem, 14px = 0.875rem, 24px = 1.5rem. The calculator stores the full precision internally so chained calculations don't accumulate rounding error.
REM (root em) is a CSS relative unit defined as a multiple of the document's root font-size. The conversion is: rem = px / rootFontSize (default 16px). The tool uses bidirectional React state — editing either input field recalculates the other — with the root font-size configurable to match project-specific base values. A reference table pre-computes common pixel values using the active base.