px to rem converter
With a 16 px root font size, 24 px = 1.5 rem: divide the pixels by the root size. Change the base if your site sets another font size on html.
- Checked on thousands of cases
- Sources: CSS Values and Units Module Level 4 (W3C)
- Updated November 6, 2026
Quick challenge
Streak 0Best 0
Test yourself: every answer is computed by the tool, and the wrong choices are the most common traps.
How it works
Formula: rem = px ÷ root font size
In CSS, 1 rem equals the font size of the root element (html), however deeply an element is nested; em refers to the parent instead. So rem = px ÷ root size and px = rem × root size. CSS also fixes 1 px = 1/96 inch and 1 pt = 1/72 inch, so 1 pt = 4/3 px: 12 pt = 16 px. The tool starts at 16 px, the usual default text size of browsers; a visitor who picks larger text in their settings changes it, which is why rem sizes follow their choice.
Worked examples
24 px with a 16 px base
24 ÷ 16 = 1.5 rem.
24 px with a 10 px base
24 ÷ 10 = 2.4 rem.
12 pt in pixels
12 × 4/3 = 16 px.
Common mistakes
Dividing by 10 when the base is 16 px: 24 px = 2.4 rem.
Divide by the real root size: 1.5 rem.
Using nested em as if they were rem: 1.5 em inside 1.5 em.
em values multiply: 16 × 1.5 × 1.5 = 36 px. With rem, 1.5 rem stays 24 px.
Treating points as pixels: 12 pt is not 12 px.
1 pt = 4/3 px: 12 pt = 16 px.
Pixels to rem with a 16 px base
| Pixels | rem | Points |
|---|---|---|
| 10 px | 0.625 rem | 7.5 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 |
| 20 px | 1.25 rem | 15 pt |
| 24 px | 1.5 rem | 18 pt |
| 28 px | 1.75 rem | 21 pt |
| 32 px | 2 rem | 24 pt |
| 40 px | 2.5 rem | 30 pt |
| 48 px | 3 rem | 36 pt |
| 64 px | 4 rem | 48 pt |
Frequently asked questions
How many pixels is 1 rem?
As many as the root font size. With 16 px: 1 rem = 16 px, 0.75 rem = 12 px and 2 rem = 32 px.
rem or em?
rem always refers to the font size of html, so 1.5 rem is the same everywhere on the page. em refers to the parent element, so nested em sizes multiply.
Why use rem rather than px?
Sizes in rem follow the text size the visitor chose in their browser settings; font sizes in px ignore that choice, which hurts people who need larger text.