frontendhack-logo
28px = 1.75rem

At the default root font size of 16px, 28px is exactly 1.75rem.

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

How to convert 28px to rem

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

28px is a medium size, common for body text, subheadings, buttons and standard spacing.

28px at different root font sizes

Root font sizeInputResult
10px28px2.8rem
12px28px2.3333rem
14px28px2rem
15px28px1.8667rem
16px28px1.75rem
18px28px1.5556rem
20px28px1.4rem
22px28px1.2727rem
24px28px1.1667rem

CSS examples

font-size: 1.75rem; /* 28px */
padding: 1.75rem;
margin-bottom: 1.75rem;
width: 1.75rem;

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

font-size: 28px;
padding: 28px;

Tailwind CSS equivalent

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

Nearby values

PixelsREM
28px1.75rem
2px0.125rem
3px0.1875rem
4px0.25rem
5px0.3125rem
6px0.375rem

Frequently Asked Questions

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

1.75rem equals 28px at a 16px root font size (1.75 × 16 = 28).

Yes. If the root font size is 18px, 28px equals 1.5556rem, and at 20px it equals 1.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.