frontendhack-logo
5rem = 80px

At the default root font size of 16px, 5rem is exactly 80px.

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

How to convert 5rem to px

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

80px is a large size, common for headings, section padding and generous layout gaps.

5rem at different root font sizes

Root font sizeInputResult
10px5rem50px
12px5rem60px
14px5rem70px
15px5rem75px
16px5rem80px
18px5rem90px
20px5rem100px
22px5rem110px
24px5rem120px

CSS examples

font-size: 5rem; /* 80px */
padding: 5rem;
margin-bottom: 5rem;
width: 5rem;

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

font-size: 80px;
padding: 80px;

Tailwind CSS equivalent

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

Nearby values

REMPixels
5rem80px
0.1rem1.6px
0.125rem2px
0.1875rem3px
0.2rem3.2px
0.25rem4px

Frequently Asked Questions

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

80px equals 5rem at a 16px root font size (80 ÷ 16 = 5).

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