frontendhack-logo
123px = 7.6875rem

At the default root font size of 16px, 123px is exactly 7.6875rem.

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

How to convert 123px to rem

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

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

123px at different root font sizes

Root font sizeInputResult
10px123px12.3rem
12px123px10.25rem
14px123px8.7857rem
15px123px8.2rem
16px123px7.6875rem
18px123px6.8333rem
20px123px6.15rem
22px123px5.5909rem
24px123px5.125rem

CSS examples

font-size: 7.6875rem; /* 123px */
padding: 7.6875rem;
margin-bottom: 7.6875rem;
width: 7.6875rem;

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

font-size: 123px;
padding: 123px;

Tailwind CSS equivalent

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

Nearby values

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

Frequently Asked Questions

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

7.6875rem equals 123px at a 16px root font size (7.6875 × 16 = 123).

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