frontendhack-logo
21.3rem = 340.8px

At the default root font size of 16px, 21.3rem is exactly 340.8px.

Calculation based on a root font-size of 16 pixels.

How to convert 21.3rem to px

To convert rem to pixels, multiply the rem value by the root font size: px = rem × 16. For 21.3rem that is 21.3 × 16 = 340.8px.

340.8px is a very large size, typically used for hero headings, containers and big layout dimensions.

21.3rem at different root font sizes

Root font sizeInputResult
10px21.3rem213px
12px21.3rem255.6px
14px21.3rem298.2px
15px21.3rem319.5px
16px21.3rem340.8px
18px21.3rem383.4px
20px21.3rem426px
22px21.3rem468.6px
24px21.3rem511.2px

CSS examples

font-size: 21.3rem; /* 340.8px */
padding: 21.3rem;
margin-bottom: 21.3rem;
width: 21.3rem;

The same values in pixels, if you need a fixed size:

font-size: 340.8px;
padding: 340.8px;

Tailwind CSS equivalent

21.3rem is not part of the default Tailwind scale, but you can use an arbitrary value such as p-[21.3rem] or text-[21.3rem].

Nearby values

REMPixels
20.8rem332.8px
20.9rem334.4px
21rem336px
21.1rem337.6px
21.2rem339.2px
21.3rem340.8px
21.4rem342.4px
21.5rem344px
21.6rem345.6px
21.7rem347.2px
21.8rem348.8px

Frequently Asked Questions

21.3rem equals 340.8px when the root font size is the browser default of 16px. The calculation is 21.3 × 16 = 340.8.

340.8px equals 21.3rem at a 16px root font size (340.8 ÷ 16 = 21.3).

Yes. rem is relative to the root font size, so 21.3rem becomes 383.4px at an 18px root and 426px 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.