frontendhack-logo
42rem = 672px

At the default root font size of 16px, 42rem is exactly 672px.

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

How to convert 42rem to px

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

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

42rem at different root font sizes

Root font sizeInputResult
10px42rem420px
12px42rem504px
14px42rem588px
15px42rem630px
16px42rem672px
18px42rem756px
20px42rem840px
22px42rem924px
24px42rem1008px

CSS examples

font-size: 42rem; /* 672px */
padding: 42rem;
margin-bottom: 42rem;
width: 42rem;

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

font-size: 672px;
padding: 672px;

Tailwind CSS equivalent

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

Nearby values

REMPixels
42rem672px
0.1rem1.6px
0.125rem2px
0.1875rem3px
0.2rem3.2px
0.25rem4px

Frequently Asked Questions

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

672px equals 42rem at a 16px root font size (672 ÷ 16 = 42).

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