frontendhack-logo
16px = 1rem

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

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

How to convert 16px to rem

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

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.

16px at different root font sizes

Root font sizeInputResult
10px16px1.6rem
12px16px1.3333rem
14px16px1.1429rem
15px16px1.0667rem
16px16px1rem
18px16px0.8889rem
20px16px0.8rem
22px16px0.7273rem
24px16px0.6667rem

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

PixelsREM
16px1rem
2px0.125rem
3px0.1875rem
4px0.25rem
5px0.3125rem
6px0.375rem

Frequently Asked Questions

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

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

Yes. If the root font size is 18px, 16px equals 0.8889rem, and at 20px it equals 0.8rem. The pixel value itself never changes, only the rem equivalent. 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.