frontendhack-logo
25px = 1.5625rem

At the default root font size of 16px, 25px is exactly 1.5625rem.

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

How to convert 25px to rem

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

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

25px at different root font sizes

Root font sizeInputResult
10px25px2.5rem
12px25px2.0833rem
14px25px1.7857rem
15px25px1.6667rem
16px25px1.5625rem
18px25px1.3889rem
20px25px1.25rem
22px25px1.1364rem
24px25px1.0417rem

CSS examples

font-size: 1.5625rem; /* 25px */
padding: 1.5625rem;
margin-bottom: 1.5625rem;
width: 1.5625rem;

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

font-size: 25px;
padding: 25px;

Tailwind CSS equivalent

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

Nearby values

PixelsREM
25px1.5625rem
2px0.125rem
3px0.1875rem
4px0.25rem
5px0.3125rem
6px0.375rem

Frequently Asked Questions

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

1.5625rem equals 25px at a 16px root font size (1.5625 × 16 = 25).

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