16 pixels is equal to 1 rem.
This conversion is based on the default browser font size, which is commonly 16 pixels. Therefore, 1 rem equals 16 pixels, making 16 px convert exactly to 1 rem. This helps maintaining scalable and consistent typography in web design.
Conversion Tool
Result in rem:
Conversion Formula
The formula to convert pixels (px) to rem units is: rem = px / baseFontSize
.
Since most browsers set the base font size to 16px by default, the formula becomes: rem = px / 16
.
This means that for any pixel value, dividing it by 16 will give the equivalent rem value. Rem units are relative to the root element font size, so they scale better across devices.
Example: Converting 16px to rem
- Start with 16 pixels.
- Divide by 16 (default root font size): 16 ÷ 16 = 1.
- The result is 1 rem.
Conversion Example
- Convert 24 px to rem:
- Take 24 pixels.
- Divide by 16: 24 ÷ 16 = 1.5.
- So, 24 px equals 1.5 rem.
- Convert 8 px to rem:
- Start with 8 pixels.
- Divide by 16: 8 ÷ 16 = 0.5.
- Result is 0.5 rem.
- Convert 32 px to rem:
- Take 32 pixels.
- Divide by 16: 32 ÷ 16 = 2.
- Equals 2 rem.
- Convert 12 px to rem:
- Start with 12 pixels.
- Divide by 16: 12 ÷ 16 = 0.75.
- So it is 0.75 rem.
Conversion Chart
The chart below shows pixel values from -9.0 to 41.0 and their equivalent rem values. To use it, find the px value and see the rem conversion by dividing by 16.
Pixels (px) | Rem | Pixels (px) | Rem | Pixels (px) | Rem |
---|---|---|---|---|---|
-9.0 | -0.5625 | 5.0 | 0.3125 | 19.0 | 1.1875 |
-8.0 | -0.5 | 6.0 | 0.375 | 20.0 | 1.25 |
-7.0 | -0.4375 | 7.0 | 0.4375 | 21.0 | 1.3125 |
-6.0 | -0.375 | 8.0 | 0.5 | 22.0 | 1.375 |
-5.0 | -0.3125 | 9.0 | 0.5625 | 23.0 | 1.4375 |
-4.0 | -0.25 | 10.0 | 0.625 | 24.0 | 1.5 |
-3.0 | -0.1875 | 11.0 | 0.6875 | 25.0 | 1.5625 |
-2.0 | -0.125 | 12.0 | 0.75 | 26.0 | 1.625 |
-1.0 | -0.0625 | 13.0 | 0.8125 | 27.0 | 1.6875 |
0.0 | 0 | 14.0 | 0.875 | 28.0 | 1.75 |
1.0 | 0.0625 | 15.0 | 0.9375 | 29.0 | 1.8125 |
2.0 | 0.125 | 16.0 | 1 | 30.0 | 1.875 |
3.0 | 0.1875 | 17.0 | 1.0625 | 31.0 | 1.9375 |
4.0 | 0.25 | 18.0 | 1.125 | 41.0 | 2.5625 |
Related Conversion Questions
- How many rem units equal 16 px in CSS?
- What is the rem value for 16 pixels when base font size changes?
- Can 16 px be converted to rem without knowing the root font size?
- Why does 16 px equal 1 rem in most browsers?
- How to convert 16 px to rem for responsive web design?
- Does 16 px always equal 1 rem if user changes default font size?
- What is the formula to convert 16 px to rem?
Conversion Definitions
px (pixel): Pixels are the smallest unit of measurement in digital screens, representing a single point of color. Pixels are absolute units, fixed in size, and depend on the screen’s resolution and display density, making them ideal for precise layouts but less flexible for scaling.
rem (root em): Rem is a CSS unit relative to the root element’s font size, usually the <html> element. Using rem allows scalable and consistent sizing across a webpage, as changing the root font size automatically adjusts all rem-based sizes proportionally.
Conversion FAQs
Is 16 px always equal to 1 rem?
Not always, 16 px equals 1 rem only when the root font size is set to 16px. If a website changes the root font size in CSS, the rem value changes accordingly. For example, if the root font is 20px, then 1 rem equals 20 px, so 16 px would be 0.8 rem.
How does changing browser default font size affect px to rem conversion?
If a user changes default font size in their browser preferences, rem units adapt because they depend on the root font size. Pixels remain fixed, so designs using rem scale better with user settings, improving accessibility and readability.
Can negative pixel values be converted to rem?
Yes, negative pixel values can be converted by dividing by the root font size, just like positive values. Though negative sizes rarely useful for font sizing, they might be used for positioning or offsets in CSS with rem units.
Why use rem instead of px for web typography?
Rem units offer better scalability and responsiveness. Since rem bases on root font size, changing it adjusts all rem sizes throughout the site, making font sizes easier to manage and more flexible across devices and user settings.
What happens if root font size is different than 16px?
The rem unit changes accordingly. So if root font size becomes 10px, 16 px equals 1.6 rem instead of 1. This means designers must know root font size to convert px to rem correctly, or use CSS custom properties for dynamic scaling.