PX to REM Converter
Conversion Guide
1. Determine the base font size (usually 16px). 2. Divide the px value by the base font size. Example: 24px / 16 = 1.5rem.
PX | REM | Actions |
---|---|---|
8 | 0.5 | |
9 | 0.5625 | |
10 | 0.625 | |
11 | 0.6875 | |
12 | 0.75 | |
13 | 0.8125 | |
14 | 0.875 | |
15 | 0.9375 | |
16 | 1 | |
18 | 1.125 | |
20 | 1.25 | |
22 | 1.375 | |
24 | 1.5 | |
26 | 1.625 | |
28 | 1.75 | |
30 | 1.875 | |
32 | 2 | |
34 | 2.125 | |
36 | 2.25 | |
38 | 2.375 |
Frequently Asked Questions
Basics
What is PX?
A CSS pixel (px) is a standardized unit of measurement that aims to make elements appear at similar physical sizes across different devices. Unlike physical screen pixels, CSS pixels are an abstraction that automatically scales based on device characteristics and user zoom settings.
Are CSS pixels the same as physical screen pixels?
When should I use pixels vs relative units?
Do pixel-based layouts work well on mobile?
What happens to pixel values when users zoom?
Do pixels affect accessibility?
What is REM?
The rem (root em) unit is a relative unit that's always based on the font-size of the root element (html). This makes it powerful for creating consistent, scalable layouts that respect user preferences. Unlike em units which compound in nested elements, rem always refers back to the root font-size.
Why should I use rem instead of pixels?
How do I calculate rem values from pixels?
What's the difference between rem and em units?
When should I use rem vs em units?
How can I debug rem calculations?
Conversion
How to convert PX to REM?
To convert PX to REM, use the following formula: