frontendhack-logo
20.7rem = 331.2px

At the default root font size of 16px, 20.7rem is exactly 331.2px.

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

How to convert 20.7rem to px

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

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

20.7rem at different root font sizes

Root font sizeInputResult
10px20.7rem207px
12px20.7rem248.4px
14px20.7rem289.8px
15px20.7rem310.5px
16px20.7rem331.2px
18px20.7rem372.6px
20px20.7rem414px
22px20.7rem455.4px
24px20.7rem496.8px

CSS examples

font-size: 20.7rem; /* 331.2px */
padding: 20.7rem;
margin-bottom: 20.7rem;
width: 20.7rem;

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

font-size: 331.2px;
padding: 331.2px;

Tailwind CSS equivalent

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

Nearby values

REMPixels
20.2rem323.2px
20.3rem324.8px
20.4rem326.4px
20.5rem328px
20.6rem329.6px
20.7rem331.2px
20.8rem332.8px
20.9rem334.4px
21rem336px
21.1rem337.6px
21.2rem339.2px

Frequently Asked Questions

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

331.2px equals 20.7rem at a 16px root font size (331.2 ÷ 16 = 20.7).

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