frontendhack-logo
4rem = 64px

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

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

How to convert 4rem to px

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

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

4rem at different root font sizes

Root font sizeInputResult
10px4rem40px
12px4rem48px
14px4rem56px
15px4rem60px
16px4rem64px
18px4rem72px
20px4rem80px
22px4rem88px
24px4rem96px

CSS examples

font-size: 4rem; /* 64px */
padding: 4rem;
margin-bottom: 4rem;
width: 4rem;

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

font-size: 64px;
padding: 64px;

Tailwind CSS equivalent

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

Nearby values

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

Frequently Asked Questions

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

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

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