frontendhack-logo
31.9rem = 510.4px

At the default root font size of 16px, 31.9rem is exactly 510.4px.

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

How to convert 31.9rem to px

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

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

31.9rem at different root font sizes

Root font sizeInputResult
10px31.9rem319px
12px31.9rem382.8px
14px31.9rem446.6px
15px31.9rem478.5px
16px31.9rem510.4px
18px31.9rem574.2px
20px31.9rem638px
22px31.9rem701.8px
24px31.9rem765.6px

CSS examples

font-size: 31.9rem; /* 510.4px */
padding: 31.9rem;
margin-bottom: 31.9rem;
width: 31.9rem;

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

font-size: 510.4px;
padding: 510.4px;

Tailwind CSS equivalent

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

Nearby values

REMPixels
31.4rem502.4px
31.5rem504px
31.6rem505.6px
31.7rem507.2px
31.8rem508.8px
31.9rem510.4px
32rem512px
32.1rem513.6px
32.2rem515.2px
32.3rem516.8px
32.4rem518.4px

Frequently Asked Questions

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

510.4px equals 31.9rem at a 16px root font size (510.4 ÷ 16 = 31.9).

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