How many rem is that many pixels?
At the default 16 px font size, rem = px ÷ 16: 24 px is 1.5 rem.
What you enter stays on your device while you use this tool. Opening a shared link sends the settings in its address to HowToolbox to prepare the page.
Result
1.5 rem
24 pixels equals 1.5 rem
- The other way round: 1 rem = 16 px.
In all units
- Pixels
- 24 px
- Root ems
- 1.5 rem
- Ems
- 1.5 em
- Points
- 18 pt
- Picas
- 1.5 pc
- Inches
- 0.25 in
- Centimetres
- 0.635 cm
- Millimetres
- 6.35 mm
- Quarter-millimetres
- 25.4 Q
At the default 16 px font size, rem = px ÷ 16: 24 px is 1.5 rem.
How to use
- Enter the size in pixels from your design file.
- Keep the font size at 16 unless your stylesheet sets a different root size.
- Copy the rem value into your CSS.
Pixels in rem
| Pixels | rem |
|---|---|
| 10 px | 0.625 rem |
| 12 px | 0.75 rem |
| 14 px | 0.875 rem |
| 16 px | 1 rem |
| 18 px | 1.125 rem |
| 20 px | 1.25 rem |
| 24 px | 1.5 rem |
| 32 px | 2 rem |
| 48 px | 3 rem |
| 64 px | 4 rem |
At a root font size of 16 px.
How it works
Designs usually arrive in pixels while a flexible stylesheet wants rem, so the same step comes up for every font size, margin and breakpoint. The rule is one division by the root font size: at 16 px, 24 px is 1.5 rem.
Using rem instead of px lets text follow the size a reader chose in the browser settings. Spacing written in rem grows with the text and keeps the proportions of the layout.
If your project sets the root size to something else, such as 62.5 % to make 1 rem equal 10 px, change the font size in the converter first. The table below is for the default root.
A few more pairs at the default root: 12 px is 0.75 rem, 20 px is 1.25 rem and 32 px is 2 rem. If the root is set to 62.5 %, the root size is 10 px and 24 px becomes 2.4 rem instead of 1.5.
Not every size should become rem. Hairline borders and shadows are often kept in px, because they should not grow with the text. Media queries written in rem or em follow the browser default size, not the size set on the html element.
Worked example
What is 24 px in rem when the root font size is 16 px?
- One pixel is 0.063 rem at that root size.
- 24 px × 0.063 = 1.5 rem
24 px is 1.5 rem.
Frequently asked questions
What is 16px in rem?
1 rem at the default root font size. 14 px is 0.875 rem and 18 px is 1.125 rem.
Does px to rem depend on the element's font size?
No. rem always follows the root element. Only em depends on the element it is used on.
Why does my rem value look wrong in my project?
Check the root font size in your stylesheet. If html has font-size: 62.5 %, one rem is 10 px, not 16.
Should I use rem or px for font sizes?
Use rem for text and the spacing around it, so it follows the reader's browser settings. Keep px for thin borders and details that should stay the same size.
Next you might need
More in Unit conversion
- Temperature converter, private, runs on your device
- Astronomical distance converter, private, runs on your device
- Audio level converter, private, runs on your device
- Bitcoin unit converter, private, runs on your device
- Data rate converter, private, runs on your device
- Data size converter, private, runs on your device





