frontendhack-logo
7px = 0.4375rem

At the default root font size of 16px, 7px is exactly 0.4375rem.

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

How to convert 7px to rem

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

7px is a very small size, typically used for borders, hairlines, icon gaps and fine detail.

7px at different root font sizes

Root font sizeInputResult
10px7px0.7rem
12px7px0.5833rem
14px7px0.5rem
15px7px0.4667rem
16px7px0.4375rem
18px7px0.3889rem
20px7px0.35rem
22px7px0.3182rem
24px7px0.2917rem

CSS examples

font-size: 0.4375rem; /* 7px */
padding: 0.4375rem;
margin-bottom: 0.4375rem;
width: 0.4375rem;

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

font-size: 7px;
padding: 7px;

Tailwind CSS equivalent

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

Nearby values

PixelsREM
7px0.4375rem
2px0.125rem
3px0.1875rem
4px0.25rem
5px0.3125rem
6px0.375rem

Frequently Asked Questions

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

0.4375rem equals 7px at a 16px root font size (0.4375 × 16 = 7).

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