At the default root font size of 16px, 1.5rem is exactly 24px.
Calculation based on a root font-size of 16 pixels.
How to convert 1.5rem to px
To convert rem to pixels, multiply the rem value by the root font size: px = rem × 16. For 1.5rem that is 1.5 × 16 = 24px.
24px is a medium size, common for body text, subheadings, buttons and standard spacing. It is often used for section subheadings and generous spacing.
1.5rem at different root font sizes
| Root font size | Input | Result |
|---|---|---|
| 10px | 1.5rem | 15px |
| 12px | 1.5rem | 18px |
| 14px | 1.5rem | 21px |
| 15px | 1.5rem | 22.5px |
| 16px | 1.5rem | 24px |
| 18px | 1.5rem | 27px |
| 20px | 1.5rem | 30px |
| 22px | 1.5rem | 33px |
| 24px | 1.5rem | 36px |
CSS examples
font-size: 1.5rem; /* 24px */
padding: 1.5rem;
margin-bottom: 1.5rem;
width: 1.5rem;The same values in pixels, if you need a fixed size:
font-size: 24px;
padding: 24px;Tailwind CSS equivalent
The default spacing scale has a step for 1.5rem: use classes like p-6, m-6, gap-6, w-6 and h-6. As a font size, 1.5rem is the default text-2xl class.
Nearby values
Frequently Asked Questions
1.5rem equals 24px when the root font size is the browser default of 16px. The calculation is 1.5 × 16 = 24.
24px equals 1.5rem at a 16px root font size (24 ÷ 16 = 1.5).
Yes. rem is relative to the root font size, so 1.5rem becomes 27px at an 18px root and 30px 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.
