frontendhack-logo
1.25rem = 20px

At the default root font size of 16px, 1.25rem is exactly 20px.

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

How to convert 1.25rem to px

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

20px is a medium size, common for body text, subheadings, buttons and standard spacing. It is often used for large body text and small headings.

1.25rem at different root font sizes

Root font sizeInputResult
10px1.25rem12.5px
12px1.25rem15px
14px1.25rem17.5px
15px1.25rem18.75px
16px1.25rem20px
18px1.25rem22.5px
20px1.25rem25px
22px1.25rem27.5px
24px1.25rem30px

CSS examples

font-size: 1.25rem; /* 20px */
padding: 1.25rem;
margin-bottom: 1.25rem;
width: 1.25rem;

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

font-size: 20px;
padding: 20px;

Tailwind CSS equivalent

The default spacing scale has a step for 1.25rem: use classes like p-5, m-5, gap-5, w-5 and h-5. As a font size, 1.25rem is the default text-xl class.

Nearby values

REMPixels
1.0625rem17px
1.1rem17.6px
1.125rem18px
1.1875rem19px
1.2rem19.2px
1.25rem20px
1.3rem20.8px
1.3125rem21px
1.375rem22px
1.4rem22.4px
1.4375rem23px

Frequently Asked Questions

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

20px equals 1.25rem at a 16px root font size (20 ÷ 16 = 1.25).

Yes. rem is relative to the root font size, so 1.25rem becomes 22.5px at an 18px root and 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.