This calculator converts pixels to the CSS unit EM.
This conversion is based on the default font-size of 16 pixel (1em = 16px).
Be aware that the unit em is relative to the font-size of the current element. So if you define a margin of 1em, the margin will grow with the font-size of that element. If you want something like em but it should stay the same in all places of the document, use REM.
Beside the pixel to EM direction, the EM to PX conversion is of course also possible. Just change the EM value.