frontendhack-logo
80px = 5rem

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

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

How to convert 80px to rem

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

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

80px at different root font sizes

Root font sizeInputResult
10px80px8rem
12px80px6.6667rem
14px80px5.7143rem
15px80px5.3333rem
16px80px5rem
18px80px4.4444rem
20px80px4rem
22px80px3.6364rem
24px80px3.3333rem

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

PixelsREM
80px5rem
2px0.125rem
3px0.1875rem
4px0.25rem
5px0.3125rem
6px0.375rem

Frequently Asked Questions

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

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

Yes. If the root font size is 18px, 80px equals 4.4444rem, and at 20px it equals 4rem. The pixel value itself never changes, only the rem equivalent. 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.