frontendhack-logo
2rem = 32px

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

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

How to convert 2rem to px

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

32px is a large size, common for headings, section padding and generous layout gaps. It is often used for page headings and large spacing.

2rem at different root font sizes

Root font sizeInputResult
10px2rem20px
12px2rem24px
14px2rem28px
15px2rem30px
16px2rem32px
18px2rem36px
20px2rem40px
22px2rem44px
24px2rem48px

CSS examples

font-size: 2rem; /* 32px */
padding: 2rem;
margin-bottom: 2rem;
width: 2rem;

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

font-size: 32px;
padding: 32px;

Tailwind CSS equivalent

The default spacing scale has a step for 2rem: use classes like p-8, m-8, gap-8, w-8 and h-8.

Nearby values

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

Frequently Asked Questions

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

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

Yes. rem is relative to the root font size, so 2rem becomes 36px at an 18px root and 40px 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.