80px to rem
At a 16px root, 80 ÷ 16 = 5rem. At a 20px root, the same 80px equals 4rem. Set the root size above to match the page you are working on.
Keep your spacing in proportion. Convert in both directions, set your root size, and handle a whole list at once.
One value or a list separated by spaces, commas or new lines. Up to 1,000 values.
24px ÷ 16 = 1.5rem
| Pixels | REM | Pixels | REM |
|---|---|---|---|
| 4px | 0.25rem | 40px | 2.5rem |
| 5px | 0.3125rem | 48px | 3rem |
| 8px | 0.5rem | 64px | 4rem |
| 10px | 0.625rem | 72px | 4.5rem |
| 12px | 0.75rem | 80px | 5rem |
| 14px | 0.875rem | 96px | 6rem |
| 16px | 1rem | 100px | 6.25rem |
| 20px | 1.25rem | 120px | 7.5rem |
| 24px | 1.5rem | 144px | 9rem |
| 32px | 2rem | 150px | 9.375rem |
The CSS rem unit is relative to the computed font size of the root element (usually ). A root font size of 16px makes 24px equal to 1.5rem. If the root is 20px, the same 24px equals 1.2rem.
References: MDN: CSS length units
No. 1rem equals the computed root font size. 16px is a common browser default, but site styles and user preferences can change it.
For most properties, em uses the element’s computed font size. For font-size itself, em uses the inherited font size. Rem uses the root font size; root font-size has special initial-value rules.
No. This version converts numeric values only. It does not rewrite stylesheets, media queries or design tokens.
Results are rounded to your selected decimal places, with trailing zeros removed. This is a display conversion using standard JavaScript numbers.
The root font size is part of every answer. The worked examples below explicitly use 16px unless another root is stated.
At a 16px root, 80 ÷ 16 = 5rem. At a 20px root, the same 80px equals 4rem. Set the root size above to match the page you are working on.
At a 16px root, 14px is 0.875rem and 150px is 9.375rem. These are conversions, not recommendations for accessible font sizes.
The table above updates with your root size and rounding preference. Conversion to rem does not by itself guarantee accessibility; font-size rules, zoom and user preferences still matter. Use the REM to PX tab for the reverse direction.