How to convert px to rem
rem is a relative unit: 1 rem equals the font size of the html element, 16 px by default. Conversion: rem = px ÷ 16. Example: 24 px = 1.5 rem and 14 px = 0.875 rem. If your site sets a different base size, enter it in the calculator.
| px | rem (16 px base) | pt |
|---|---|---|
| 12 px | 0.75 rem | 9 pt |
| 14 px | 0.875 rem | 10.5 pt |
| 16 px | 1 rem | 12 pt |
| 18 px | 1.125 rem | 13.5 pt |
| 24 px | 1.5 rem | 18 pt |
| 32 px | 2 rem | 24 pt |
Why rem instead of px
- Accessibility — when users increase the browser’s default font size, rem sizes grow with it, px sizes don’t.
- Consistency — changing the base size scales all typography and spacing at once.
- em is relative to the parent’s font size, so nested elements can grow unexpectedly; rem is always relative to html.
Frequently asked questions
How many pixels is 1 rem?
16 px by default — unless the site’s stylesheet sets a different size on the html element.
Should I set html { font-size: 62.5% }?
It’s an old trick that makes 1 rem = 10 px. It works but means resetting text sizes everywhere. It’s simpler to keep 16 px and convert with this tool.