px to em
Convert pixels to em units based on any parent font size — essential for scalable, accessible CSS typography
16px ÷ 16 = 1 em
Result
1 em
parent: 16px
About this calculator
The em unit is relative to the font size of its parent element, making it context-dependent unlike rem. Converting px to em is useful when building components that should scale with their container. Enter your px value and the parent's font size to instantly get the em equivalent — great for padding, margins, and font sizes in nested components.
Common examples
- 16px = 1em (parent 16px)
- 24px = 1.5em (parent 16px)
- 14px = 0.875em (parent 16px)
- 20px = 1.25em (parent 16px)
- 12px = 0.75em (parent 16px)