At the default root font size of 16px, 32px is exactly 2rem.
Calculation based on a root font-size of 16 pixels.
How to convert 32px to rem
To convert pixels to rem, divide the pixel value by the root font size: rem = px ÷ 16. For 32px that is 32 ÷ 16 = 2rem.
32px is a large size, common for headings, section padding and generous layout gaps. It is often used for page headings and large spacing.
32px at different root font sizes
| Root font size | Input | Result |
|---|---|---|
| 10px | 32px | 3.2rem |
| 12px | 32px | 2.6667rem |
| 14px | 32px | 2.2857rem |
| 15px | 32px | 2.1333rem |
| 16px | 32px | 2rem |
| 18px | 32px | 1.7778rem |
| 20px | 32px | 1.6rem |
| 22px | 32px | 1.4545rem |
| 24px | 32px | 1.3333rem |
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
Frequently Asked Questions
32px equals 2rem when the root font size is the browser default of 16px. The calculation is 32 ÷ 16 = 2.
2rem equals 32px at a 16px root font size (2 × 16 = 32).
Yes. If the root font size is 18px, 32px equals 1.7778rem, and at 20px it equals 1.6rem. 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.
