PX to EM Converter

What is EM?

EM is a CSS unit relative to the font size of the parent element. Unlike REM (which is relative to the root), EM cascades — nested elements compound their parent's font size. Developers use EM for component-scoped sizing like button padding and spacing that should scale with the element's own font.

Formula

EM = PX ÷ parent font size

With a 16px parent: 32px ÷ 16 = 2em. Enter the actual parent font size of your element below for accurate results.

Calculator

1em = 16px at parent font size 16

Common Conversions (parent 16px)

PXEM
8px0.5em
12px0.75em
14px0.875em
16px1em
24px1.5em
32px2em

Frequently Asked Questions

How do I convert px to em?

Divide the pixel value by the parent element's font size. For example, 32px with a 16px parent = 2em.

What is the difference between em and rem?

EM is relative to the parent element's font size, while REM is relative to the root (html) element's font size. EM can cascade and compound; REM is more predictable.

When should I use em units in CSS?

Use em for spacing and sizing that should scale relative to the component's own font size, such as padding and margins on buttons, or icon sizes within text.