px to rem
A converter that calculates the rem from a px for a given rem size to make the measurement responsive
Hot Keys
— Calculate and copy the result of calculation.
— Calculate the result.
— Copy the result of calculation.
— Reverse the converter to "REM to PX".
— Focus the "Pixels" input.
— Focus the "REM Size" input.
Extensions
FAQ
How to convert PX to REM?
To convert px to rem, you should know total size of 1 REM, default is 16px Then, just apply formula: px / rem For example, with 16px size of 1rem, 32px will be converted to: 32 / 16 = 2rem
What is the PX to REM formula?
px / rem
What is rem unit?
REM is defined relative to the font size of the root element. The root element is matched by the :root pseudo-class or the html selector. 1 REM therefore takes on the value which is given to the font-size of the root element. This means that 1 REM keeps the same value throughout your whole CSS code.
What is px unit? (Pixels)
Pixel unit is the theorical smallest dot displayed on a computer screen. Nowadays, pixel unit can differ between physical resolution and logical resolution. This difference is called device pixel ratio or DPR: Logical resolution = physical resolution / device pixel ratio. So, a screen with 1024x768 physical resolution with a DPR of 2 will have a 512x384 logical resolution.
PX to REM Conversion Table if rem size is 16px
px | rem |
---|---|
10px | 0.625rem |
20px | 1.25rem |
30px | 1.875rem |
40px | 2.5rem |
50px | 3.125rem |
60px | 3.75rem |
70px | 4.375rem |
80px | 5rem |
90px | 5.625rem |
100px | 6.25rem |
110px | 6.875rem |
120px | 7.5rem |
130px | 8.125rem |
140px | 8.75rem |
150px | 9.375rem |
160px | 10rem |
170px | 10.625rem |
180px | 11.25rem |
190px | 11.875rem |
200px | 12.5rem |
210px | 13.125rem |
220px | 13.75rem |
230px | 14.375rem |
240px | 15rem |
250px | 15.625rem |