JESUS CHRIST IS THE ONLY TRUE GOD
Conversion calculator

PX to EM Calculator

Convert CSS pixels to em units using a selected element font size.

Your calculationPrivate in your browser
Report a result

Start with a worked example

Open the worked example for em. The example starts with Pixels = 16, Font size (px) = 16.

PX to EM Calculator formula

em = pixels ÷ font size in pixels.

Inputs and units

Inputs and example values for PX to EM Calculator
InputFormat / rangeExample
PixelsNumber16
Font size (px)min 1e-0616

Worked example

The values listed in Inputs and units give 1 em for em.

em
1 em

Results and assumptions

Change Pixels from 16 to 17.6 and keep the other example inputs fixed. The updated answer is 1.1 em (em).

Fix an input or unexpected result

Pixels is required. Enter pixels using the format and bounds in the input table. Zero and an empty field are different: use zero only if it is allowed and represents your data.

See how to check a result or report an issue.