frontendhack-logo
1.3125rem = 21px

At the default root font size of 16px, 1.3125rem is exactly 21px.

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

How to convert 1.3125rem to px

To convert rem to pixels, multiply the rem value by the root font size: px = rem × 16. For 1.3125rem that is 1.3125 × 16 = 21px.

21px is a medium size, common for body text, subheadings, buttons and standard spacing.

1.3125rem at different root font sizes

Root font sizeInputResult
10px1.3125rem13.125px
12px1.3125rem15.75px
14px1.3125rem18.375px
15px1.3125rem19.6875px
16px1.3125rem21px
18px1.3125rem23.625px
20px1.3125rem26.25px
22px1.3125rem28.875px
24px1.3125rem31.5px

CSS examples

font-size: 1.3125rem; /* 21px */
padding: 1.3125rem;
margin-bottom: 1.3125rem;
width: 1.3125rem;

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

font-size: 21px;
padding: 21px;

Tailwind CSS equivalent

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

Nearby values

REMPixels
1.125rem18px
1.1875rem19px
1.2rem19.2px
1.25rem20px
1.3rem20.8px
1.3125rem21px
1.375rem22px
1.4rem22.4px
1.4375rem23px
1.5rem24px
1.5625rem25px

Frequently Asked Questions

1.3125rem equals 21px when the root font size is the browser default of 16px. The calculation is 1.3125 × 16 = 21.

21px equals 1.3125rem at a 16px root font size (21 ÷ 16 = 1.3125).

Yes. rem is relative to the root font size, so 1.3125rem becomes 23.625px at an 18px root and 26.25px at a 20px root. 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.