frontendhack-logo
5.125rem = 82px

At the default root font size of 16px, 5.125rem is exactly 82px.

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

How to convert 5.125rem to px

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

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

5.125rem at different root font sizes

Root font sizeInputResult
10px5.125rem51.25px
12px5.125rem61.5px
14px5.125rem71.75px
15px5.125rem76.875px
16px5.125rem82px
18px5.125rem92.25px
20px5.125rem102.5px
22px5.125rem112.75px
24px5.125rem123px

CSS examples

font-size: 5.125rem; /* 82px */
padding: 5.125rem;
margin-bottom: 5.125rem;
width: 5.125rem;

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

font-size: 82px;
padding: 82px;

Tailwind CSS equivalent

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

Nearby values

REMPixels
4.9rem78.4px
4.9375rem79px
5rem80px
5.0625rem81px
5.1rem81.6px
5.125rem82px
5.1875rem83px
5.2rem83.2px
5.25rem84px
5.3rem84.8px
5.3125rem85px

Frequently Asked Questions

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

82px equals 5.125rem at a 16px root font size (82 ÷ 16 = 5.125).

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