frontendhack-logo
2.8125rem = 45px

At the default root font size of 16px, 2.8125rem is exactly 45px.

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

How to convert 2.8125rem to px

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

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

2.8125rem at different root font sizes

Root font sizeInputResult
10px2.8125rem28.125px
12px2.8125rem33.75px
14px2.8125rem39.375px
15px2.8125rem42.1875px
16px2.8125rem45px
18px2.8125rem50.625px
20px2.8125rem56.25px
22px2.8125rem61.875px
24px2.8125rem67.5px

CSS examples

font-size: 2.8125rem; /* 45px */
padding: 2.8125rem;
margin-bottom: 2.8125rem;
width: 2.8125rem;

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

font-size: 45px;
padding: 45px;

Tailwind CSS equivalent

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

Nearby values

REMPixels
2.625rem42px
2.6875rem43px
2.7rem43.2px
2.75rem44px
2.8rem44.8px
2.8125rem45px
2.875rem46px
2.9rem46.4px
2.9375rem47px
3rem48px
3.0625rem49px

Frequently Asked Questions

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

45px equals 2.8125rem at a 16px root font size (45 ÷ 16 = 2.8125).

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