CSS px ↔ rem ↔ em
Calculate CSS px ↔ rem ↔ em instantly with the exact formula and a worked example. Free online calculator — no signup, works on mobile.
CSS px ↔ rem ↔ em
Pixels
Base sizepx
rem
1.5
More about: CSS px ↔ rem ↔ em
What it calculates
The “CSS px ↔ rem ↔ em” calculator computes rem from 2 parameters: pixels, base size (px).
Standard IT calculations for developers and sysadmins.
Example calculation
With parameters Pixels = 24, Base size = 16 px the result is 1.5 (px / 16).
How to use
- Enter the parameter values — every field above is adjustable with a slider.
- The result and related metrics are calculated automatically as you type.
- Use the additional metrics shown (if any) where needed.
- Copy the result or bookmark the page.