698 tools
All

px to em

Turn a pixel size into em (or rem) against a root font size, usually 16 px.

 

 

em

About this calculator

Use this for CSS when a design is in pixels and the stylesheet wants relative units. Type the pixel size and the base font size.

em = px ÷ base. With a 16 px root, 24 px is 1.5 em. This is a simple ratio, not a full cascade of nested ems. The same number is rem if the base is the root font size.

Pixels: The size in pixels you want to express as em.

Base font (px): The root (or parent) font size in pixels, often 16.

em: The relative size, px ÷ base.