frontendhack-logo
3px = 0.1875rem

At the default root font size of 16px, 3px is exactly 0.1875rem.

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

How to convert 3px to rem

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

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

3px at different root font sizes

Root font sizeInputResult
10px3px0.3rem
12px3px0.25rem
14px3px0.2143rem
15px3px0.2rem
16px3px0.1875rem
18px3px0.1667rem
20px3px0.15rem
22px3px0.1364rem
24px3px0.125rem

CSS examples

font-size: 0.1875rem; /* 3px */
padding: 0.1875rem;
margin-bottom: 0.1875rem;
width: 0.1875rem;

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

font-size: 3px;
padding: 3px;

Tailwind CSS equivalent

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

Nearby values

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

Frequently Asked Questions

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

0.1875rem equals 3px at a 16px root font size (0.1875 × 16 = 3).

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