At the default root font size of 16px, 21.5rem is exactly 344px.
Calculation based on a root font-size of 16 pixels.
How to convert 21.5rem to px
To convert rem to pixels, multiply the rem value by the root font size: px = rem × 16. For 21.5rem that is 21.5 × 16 = 344px.
344px is a very large size, typically used for hero headings, containers and big layout dimensions.
21.5rem at different root font sizes
| Root font size | Input | Result |
|---|---|---|
| 10px | 21.5rem | 215px |
| 12px | 21.5rem | 258px |
| 14px | 21.5rem | 301px |
| 15px | 21.5rem | 322.5px |
| 16px | 21.5rem | 344px |
| 18px | 21.5rem | 387px |
| 20px | 21.5rem | 430px |
| 22px | 21.5rem | 473px |
| 24px | 21.5rem | 516px |
CSS examples
font-size: 21.5rem; /* 344px */
padding: 21.5rem;
margin-bottom: 21.5rem;
width: 21.5rem;The same values in pixels, if you need a fixed size:
font-size: 344px;
padding: 344px;Tailwind CSS equivalent
21.5rem is not part of the default Tailwind scale, but you can use an arbitrary value such as p-[21.5rem] or text-[21.5rem].
Nearby values
Frequently Asked Questions
21.5rem equals 344px when the root font size is the browser default of 16px. The calculation is 21.5 × 16 = 344.
344px equals 21.5rem at a 16px root font size (344 ÷ 16 = 21.5).
Yes. rem is relative to the root font size, so 21.5rem becomes 387px at an 18px root and 430px 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.
