PX to REM Converter & Calculator
Convert px to rem or rem to px for CSS, using the root font size configured in your project.
Interactive workspace
No account requiredResults and sharing
Review the conversion and formula, copy the CSS-ready value, or select a reference size. Swap PX/REM to reverse. REM uses root font size; EM uses parent font size.
Use Share result to preview and copy a link. Anyone with the link can read the included details; nothing is saved on our server. Shared result links open read-only snapshots. Large results require a downloaded file instead.
How to use it
- Choose px to rem, rem to px, px to em, or pt to px.
- Enter the value and set the root or parent font size when applicable.
- Read the conversion and formula, or select a common reference value.
- Copy the CSS-ready result, or swap px and rem units to convert back.
PX to REM conversion table
At a 16px base font size, rem = px ÷ 16. The calculator lets you change this base for your project.
| Pixels | REM |
|---|---|
| 1px | 0.0625rem |
| 2px | 0.125rem |
| 4px | 0.25rem |
| 6px | 0.375rem |
| 8px | 0.5rem |
| 10px | 0.625rem |
| 12px | 0.75rem |
| 13px | 0.8125rem |
| 14px | 0.875rem |
| 15px | 0.9375rem |
| 16px | 1rem |
| 18px | 1.125rem |
| 20px | 1.25rem |
| 22px | 1.375rem |
| 24px | 1.5rem |
| 26px | 1.625rem |
| 28px | 1.75rem |
| 30px | 1.875rem |
| 32px | 2rem |
| 36px | 2.25rem |
| 40px | 2.5rem |
| 44px | 2.75rem |
| 48px | 3rem |
| 56px | 3.5rem |
| 64px | 4rem |
| 72px | 4.5rem |
| 80px | 5rem |
| 96px | 6rem |
| 128px | 8rem |
REM to PX conversion table
At a 16px root font size: px = rem × 16. Choose another base in the calculator when your project uses a different root size.
| REM | Pixels |
|---|---|
| 0.125rem | 2px |
| 0.25rem | 4px |
| 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.5rem | 40px |
| 3rem | 48px |
| 4rem | 64px |
| 5rem | 80px |
rem vs em vs px: when to use which
rem scales from the document root font size, so it is useful for consistent typography and spacing. em scales from the current element's font size (or its parent for properties such as font-size), which can be useful for component-relative sizing. px is a fixed CSS reference unit and suits fine details such as borders. In CSS, one point equals 4/3 pixels, so use the PT to PX mode for this fixed conversion. Prefer the unit whose scaling behavior matches the design.