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
- Enter pixels, parent font size, levels of nesting.
- The result updates instantly as you type — press Calculate (or Enter) at any time.
- Review the breakdown shown under the main result.
- 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