At the default root font size of 16px, 64px is exactly 4rem.
Calculation based on a root font-size of 16 pixels.
How to convert 64px to rem
To convert pixels to rem, divide the pixel value by the root font size: rem = px ÷ 16. For 64px that is 64 ÷ 16 = 4rem.
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.
64px at different root font sizes
| Root font size | Input | Result |
|---|---|---|
| 10px | 64px | 6.4rem |
| 12px | 64px | 5.3333rem |
| 14px | 64px | 4.5714rem |
| 15px | 64px | 4.2667rem |
| 16px | 64px | 4rem |
| 18px | 64px | 3.5556rem |
| 20px | 64px | 3.2rem |
| 22px | 64px | 2.9091rem |
| 24px | 64px | 2.6667rem |
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
Frequently Asked Questions
64px equals 4rem when the root font size is the browser default of 16px. The calculation is 64 ÷ 16 = 4.
4rem equals 64px at a 16px root font size (4 × 16 = 64).
Yes. If the root font size is 18px, 64px equals 3.5556rem, and at 20px it equals 3.2rem. 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.
