frontendhack-logo
20.5rem = 328px

At the default root font size of 16px, 20.5rem is exactly 328px.

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

How to convert 20.5rem to px

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

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

20.5rem at different root font sizes

Root font sizeInputResult
10px20.5rem205px
12px20.5rem246px
14px20.5rem287px
15px20.5rem307.5px
16px20.5rem328px
18px20.5rem369px
20px20.5rem410px
22px20.5rem451px
24px20.5rem492px

CSS examples

font-size: 20.5rem; /* 328px */
padding: 20.5rem;
margin-bottom: 20.5rem;
width: 20.5rem;

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

font-size: 328px;
padding: 328px;

Tailwind CSS equivalent

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

Nearby values

REMPixels
20rem320px
20.1rem321.6px
20.2rem323.2px
20.3rem324.8px
20.4rem326.4px
20.5rem328px
20.6rem329.6px
20.7rem331.2px
20.8rem332.8px
20.9rem334.4px
21rem336px

Frequently Asked Questions

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

328px equals 20.5rem at a 16px root font size (328 ÷ 16 = 20.5).

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