frontendhack-logo
38px = 2.375rem

At the default root font size of 16px, 38px is exactly 2.375rem.

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

How to convert 38px to rem

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

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

38px at different root font sizes

Root font sizeInputResult
10px38px3.8rem
12px38px3.1667rem
14px38px2.7143rem
15px38px2.5333rem
16px38px2.375rem
18px38px2.1111rem
20px38px1.9rem
22px38px1.7273rem
24px38px1.5833rem

CSS examples

font-size: 2.375rem; /* 38px */
padding: 2.375rem;
margin-bottom: 2.375rem;
width: 2.375rem;

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

font-size: 38px;
padding: 38px;

Tailwind CSS equivalent

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

Nearby values

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

Frequently Asked Questions

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

2.375rem equals 38px at a 16px root font size (2.375 × 16 = 38).

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