frontendhack-logo
20rem = 320px

At the default root font size of 16px, 20rem is exactly 320px.

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

How to convert 20rem to px

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

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

20rem at different root font sizes

Root font sizeInputResult
10px20rem200px
12px20rem240px
14px20rem280px
15px20rem300px
16px20rem320px
18px20rem360px
20px20rem400px
22px20rem440px
24px20rem480px

CSS examples

font-size: 20rem; /* 320px */
padding: 20rem;
margin-bottom: 20rem;
width: 20rem;

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

font-size: 320px;
padding: 320px;

Tailwind CSS equivalent

The default spacing scale has a step for 20rem: use classes like p-80, m-80, gap-80, w-80 and h-80.

Nearby values

REMPixels
20rem320px
0.1rem1.6px
0.125rem2px
0.1875rem3px
0.2rem3.2px
0.25rem4px

Frequently Asked Questions

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

320px equals 20rem at a 16px root font size (320 ÷ 16 = 20).

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