CalcThis CalcThis
Pixels, rem, em, points and percent for CSS

PX to REM Converter

Convert pixels to rem and rem to pixels — and em, points, picas, percent and viewport units — using your own root font size. A live text sample shows the size you are converting to.

Convert

Converter
From
To
Result
—
Enter a value to convert.
Result
—

How to convert px to rem

A rem is the root (html) font size, which browsers set to 16 px unless you change it, so 24 px = 1.5 rem and 1.5 rem = 24 px. An em is the font size of the element's parent, so it equals rem only when the parent is the root size. A CSS inch is always 96 px, a point is 1/72 inch: 12 pt = 16 px.

The formula

rem = px ÷ root font sizePX = REM × ROOT FONT SIZE · BROWSERS DEFAULT TO 16 PX · 1 IN = 96 PX · 1 PT = 4/3 PX

Common conversions

Pixels to rem (root font size)

Pixelsrem (root font size)
8 px0.5 rem
12 px0.75 rem
14 px0.875 rem
16 px1 rem
18 px1.125 rem
20 px1.25 rem
24 px1.5 rem
32 px2 rem
48 px3 rem
64 px4 rem

rem (root font size) to pixels

rem (root font size)Pixels
0.5 rem8 px
0.75 rem12 px
1 rem16 px
1.25 rem20 px
1.5 rem24 px
2 rem32 px
3 rem48 px

Points to pixels

PointsPixels
8 pt10.666667 px
10 pt13.333333 px
12 pt16 px
14 pt18.666667 px
18 pt24 px
24 pt32 px

Sources: factors are the exact international definitions — BIPM SI Brochure, NIST Special Publication 811 and, for binary data units, IEC 80000-13.

Use the px to rem converter

Type a value, pick the unit you have and the unit you want, and the answer appears with every other unit in the same family listed below it. Use the swap button to flip the two units. Under Go advanced you can set how many digits the result shows, your parent font size for em and %, and your viewport size for vw and vh.

Other converters

All unit converters

Also see the Recipe Converter, which scales and converts a whole recipe at once.

Common questions

How do I convert px to rem?

Divide the pixels by the root font size, 16 px by default. 24 px = 1.5 rem, 14 px = 0.875 rem and 10 px = 0.625 rem. If your root size is 10 px, enter 10 in the root font size box above and 24 px becomes 2.4 rem.

How do I convert rem to px?

Multiply rem by the root font size. 1 rem = 16 px, 1.5 rem = 24 px and 2 rem = 32 px.

What is the difference between em and rem?

Rem is relative to the root font size and em to the parent element's font size. 24 px = 1.2 em when the parent is 20 px, but 24 px = 1.5 rem whatever the parent is. Set the parent size under Go advanced to convert em.

How many pixels are in a point, pica and inch?

In CSS: 1 pt = 1.3333333 px, 1 pc = 16 px and 1 in = 96 px. So a 12 pt font is 16 px.

How do I convert px to vw?

Divide the pixels by the viewport width and multiply by 100. On a 1,920 px wide viewport 960 px = 50 vw. Enter your viewport width under Go advanced.