Business
Pixels to REM calculator
Convert px to rem or rem to px using your stylesheet's root font size. The starting value is 16px, and you can change it. REM output rounds to 4 decimal places; pixel output rounds to 2.
Live calculator
Enter your details
Pixels to REM Calculator
Convert pixels to rem or rem to pixels using an editable root font size.
Inputs used
Results
Additional notes
Your estimate
Results
Partner pick
Coding monitorInspect responsive layouts on a dedicated display.Paid link · Check current price ↗As an Amazon Associate I earn from qualifying purchases.The math, plainly
How it works
- 01
For pixels to REM, divide the pixel value by the root font size: rem = px ÷ root px.
- 02
For REM to pixels, multiply the REM value by the root font size: px = rem × root px.
- 03
The root font size defaults to 16px and can be changed to match your stylesheet. REM output rounds to 4 decimal places; pixel output rounds to 2.
Try a real scenario
Convert 24px using a 16px root size
Inputs24px; root font size 16px
Result1.5rem.
More from Amazon
More options for this calculator
Programming keyboard (paid link)
Keep a comfortable keyboard at hand while editing stylesheets.
Laptop stand (paid link)
Raise a laptop screen when checking designs at different sizes.
CSS reference book (paid link)
Keep a printed CSS reference nearby while building pages.
As an Amazon Associate I earn from qualifying purchases.