Skip to content
Calculator Tools
Web Development Calculators

PX to EM Converter

Convert pixels to em units relative to the parent font size, with nesting compounding shown.

Enter values

Results update as you type.

Result

In em

1.5 em

CSS value
1.5em
Back to pixels
24 px
Compounded over 1 levels
24 px
Compounding warning
No compounding at a single level

About the PX to EM Converter

Convert pixels to em units relative to the parent font size, with nesting compounding shown.

Also known as: pixel to em, px em converter, em calculator css.

How to use this calculator

  1. Enter pixels, parent font size, levels of nesting.
  2. The result updates instantly as you type — press Calculate (or Enter) at any time.
  3. Review the breakdown shown under the main result.
  4. Use Copy result or Share to save the answer or send a link with your inputs.

Formula

em = pixels ÷ parent font size

Worked example

Using the values pre-filled in the calculator above:

  • Pixels = 24 px
  • Parent font size = 16 px
  • Levels of nesting = 1

the calculator returns:

  • In em: 1.5 em
  • CSS value: 1.5em
  • Back to pixels: 24 px
  • Compounded over 1 levels: 24 px