frontendhack-logo
1rem = 16px

At the default root font size of 16px, 1rem is exactly 16px.

Calculation based on a root font-size of 16 pixels.

How to convert 1rem to px

To convert rem to pixels, multiply the rem value by the root font size: px = rem × 16. For 1rem that is 1 × 16 = 16px.

16px is a medium size, common for body text, subheadings, buttons and standard spacing. It is often used for the default browser font size, which is exactly 1rem.

1rem at different root font sizes

Root font sizeInputResult
10px1rem10px
12px1rem12px
14px1rem14px
15px1rem15px
16px1rem16px
18px1rem18px
20px1rem20px
22px1rem22px
24px1rem24px

CSS examples

font-size: 1rem; /* 16px */
padding: 1rem;
margin-bottom: 1rem;
width: 1rem;

The same values in pixels, if you need a fixed size:

font-size: 16px;
padding: 16px;

Tailwind CSS equivalent

The default spacing scale has a step for 1rem: use classes like p-4, m-4, gap-4, w-4 and h-4. As a font size, 1rem is the default text-base class.

Nearby values

REMPixels
1rem16px
0.1rem1.6px
0.125rem2px
0.1875rem3px
0.2rem3.2px
0.25rem4px

Frequently Asked Questions

1rem equals 16px when the root font size is the browser default of 16px. The calculation is 1 × 16 = 16.

16px equals 1rem at a 16px root font size (16 ÷ 16 = 1).

Yes. rem is relative to the root font size, so 1rem becomes 18px at an 18px root and 20px at a 20px root. Use the base font size field above to try any value.

Prefer rem for font sizes, spacing and layout so they respect the user's browser font settings and scale for accessibility. Use px for details that should never scale, such as 1px borders or fixed icon sizes.