frontendhack-logo
21.5rem = 344px

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 sizeInputResult
10px21.5rem215px
12px21.5rem258px
14px21.5rem301px
15px21.5rem322.5px
16px21.5rem344px
18px21.5rem387px
20px21.5rem430px
22px21.5rem473px
24px21.5rem516px

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

REMPixels
21rem336px
21.1rem337.6px
21.2rem339.2px
21.3rem340.8px
21.4rem342.4px
21.5rem344px
21.6rem345.6px
21.7rem347.2px
21.8rem348.8px
21.9rem350.4px
22rem352px

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.