frontendhack-logo
31rem = 496px

At the default root font size of 16px, 31rem is exactly 496px.

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

How to convert 31rem to px

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

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

31rem at different root font sizes

Root font sizeInputResult
10px31rem310px
12px31rem372px
14px31rem434px
15px31rem465px
16px31rem496px
18px31rem558px
20px31rem620px
22px31rem682px
24px31rem744px

CSS examples

font-size: 31rem; /* 496px */
padding: 31rem;
margin-bottom: 31rem;
width: 31rem;

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

font-size: 496px;
padding: 496px;

Tailwind CSS equivalent

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

Nearby values

REMPixels
31rem496px
0.1rem1.6px
0.125rem2px
0.1875rem3px
0.2rem3.2px
0.25rem4px

Frequently Asked Questions

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

496px equals 31rem at a 16px root font size (496 ÷ 16 = 31).

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