frontendhack-logo
300px = 18.75rem

At the default root font size of 16px, 300px is exactly 18.75rem.

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

How to convert 300px to rem

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

300px is a very large size, typically used for hero headings, containers and big layout dimensions.

300px at different root font sizes

Root font sizeInputResult
10px300px30rem
12px300px25rem
14px300px21.4286rem
15px300px20rem
16px300px18.75rem
18px300px16.6667rem
20px300px15rem
22px300px13.6364rem
24px300px12.5rem

CSS examples

font-size: 18.75rem; /* 300px */
padding: 18.75rem;
margin-bottom: 18.75rem;
width: 18.75rem;

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

font-size: 300px;
padding: 300px;

Tailwind CSS equivalent

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

Nearby values

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

Frequently Asked Questions

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

18.75rem equals 300px at a 16px root font size (18.75 × 16 = 300).

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