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 size | Input | Result |
|---|---|---|
| 10px | 25px | 2.5rem |
| 12px | 25px | 2.0833rem |
| 14px | 25px | 1.7857rem |
| 15px | 25px | 1.6667rem |
| 16px | 25px | 1.5625rem |
| 18px | 25px | 1.3889rem |
| 20px | 25px | 1.25rem |
| 22px | 25px | 1.1364rem |
| 24px | 25px | 1.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
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.
