At the default root font size of 16px, 50px is exactly 3.125rem.
Calculation based on a root font-size of 16 pixels.
How to convert 50px to rem
To convert pixels to rem, divide the pixel value by the root font size: rem = px ÷ 16. For 50px that is 50 ÷ 16 = 3.125rem.
50px is a large size, common for headings, section padding and generous layout gaps.
50px at different root font sizes
| Root font size | Input | Result |
|---|---|---|
| 10px | 50px | 5rem |
| 12px | 50px | 4.1667rem |
| 14px | 50px | 3.5714rem |
| 15px | 50px | 3.3333rem |
| 16px | 50px | 3.125rem |
| 18px | 50px | 2.7778rem |
| 20px | 50px | 2.5rem |
| 22px | 50px | 2.2727rem |
| 24px | 50px | 2.0833rem |
CSS examples
font-size: 3.125rem; /* 50px */
padding: 3.125rem;
margin-bottom: 3.125rem;
width: 3.125rem;The same values in pixels, if you need a fixed size:
font-size: 50px;
padding: 50px;Tailwind CSS equivalent
3.125rem is not part of the default Tailwind scale, but you can use an arbitrary value such as p-[3.125rem] or text-[3.125rem].
Nearby values
Frequently Asked Questions
50px equals 3.125rem when the root font size is the browser default of 16px. The calculation is 50 ÷ 16 = 3.125.
3.125rem equals 50px at a 16px root font size (3.125 × 16 = 50).
Yes. If the root font size is 18px, 50px equals 2.7778rem, and at 20px it equals 2.5rem. 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.
