Toolman

128px to em

128px = 8em

At the browser default font size of 16 px. Change it and this number changes — see below.

How it is calculated

One px is 0.0625em, so:

128px × 0.0625 = 8em

Reversing it, 8em × 16 returns 128px.

128px at other font sizes

em is measured against the element's own font size, inherited from its parent unless it sets one, so the answer above holds only while that is 16 px. Nested elements each compound on their parent, so this is the value for one level, not for the whole tree.

Font size128px equals
14 px9.1429em
16 px (default)8em
18 px7.1111em
20 px6.4em
24 px5.3333em

Nearby values

pxem
64px4em
72px4.5em
80px5em
96px6em
128px8em

Frequently asked questions

What is 128px in em?

8em at the default 16 px font size.

How is 128px converted to em?

Multiply by 0.0625: 128 × 0.0625 = 8. To go back, multiply 8 by 16.

Is 8em always the answer?

No. em is relative to the element's own font size, inherited from its parent unless it sets one, so 128px is 8em only while that is 16 px. The table above gives the value at the sizes you are most likely to meet.

The full PX to EM converter → · All CSS unit converters