How many pixels is 1rem?
1rem is 16px at the browser default root font size of 16px. If the root font size changes, multiply 1 by that value instead; for example, 1rem is 10px at a 10px base.
To convert rem to px, multiply the rem value by the root font size: at the browser default of 16px, 1rem = 16px, 1.5rem = 24px and 0.875rem = 14px. Enter any value and base below.
24px at a 16px base
font-size: 24px;Conversion table (base 16px)
| Pixels | REM |
|---|---|
| 1px | 0.0625rem |
| 2px | 0.125rem |
| 4px | 0.25rem |
| 6px | 0.375rem |
| 8px | 0.5rem |
| 10px | 0.625rem |
| 12px | 0.75rem |
| 14px | 0.875rem |
| 15px | 0.9375rem |
| 16px | 1rem |
| 18px | 1.125rem |
| 20px | 1.25rem |
| 24px | 1.5rem |
| 28px | 1.75rem |
| 30px | 1.875rem |
| 32px | 2rem |
| 36px | 2.25rem |
| 40px | 2.5rem |
| 48px | 3rem |
| 56px | 3.5rem |
| 64px | 4rem |
| 72px | 4.5rem |
| 80px | 5rem |
| 96px | 6rem |
| 128px | 8rem |
| REM | Pixels |
|---|---|
| 0.125rem | 2px |
| 0.25rem | 4px |
| 0.375rem | 6px |
| 0.5rem | 8px |
| 0.625rem | 10px |
| 0.75rem | 12px |
| 0.875rem | 14px |
| 1rem | 16px |
| 1.125rem | 18px |
| 1.25rem | 20px |
| 1.5rem | 24px |
| 1.75rem | 28px |
| 2rem | 32px |
| 2.25rem | 36px |
| 2.5rem | 40px |
| 3rem | 48px |
| 3.5rem | 56px |
| 4rem | 64px |
| 5rem | 80px |
| 6rem | 96px |
| 8rem | 128px |
Multiply the rem value by the document's root font size:
px = rem × root font size 1.5rem at a 16px base → 1.5 × 16 = 24px 2rem at a 10px base → 2 × 10 = 20px
If a stylesheet sets html { font-size } to something other than the 16px browser default, use that value as the base.
rem is relative to the root html font size, while em is relative to the parent element's font size. This means rem stays predictable when components are nested, whereas nested em values can compound.
Convert in the other direction or pair fixed values with fluid type.
1rem is 16px at the browser default root font size of 16px. If the root font size changes, multiply 1 by that value instead; for example, 1rem is 10px at a 10px base.
1.5rem is 24px at a 16px base because 1.5 × 16 = 24. At another root font size, multiply 1.5 by that base to get the pixel value.
2rem is 32px at a 16px base because 2 × 16 = 32. It is 20px at a 10px base because 2 × 10 = 20.