PX to EM Converter

Convert pixels to EM for any parent font size. With a 16 px font size, 16 px = 1 em.

⇅
The base font size is pixels.
Rounding precision (max 15):

Popular PX Values in EM

With a 16 px parent: 8px = 0.5em, 12px = 0.75em, 14px = 0.875em, 20px = 1.25em, 24px = 1.5em and 32px = 2em.

PX to EM Conversion Table

EM depends on the font size of the element (or its parent, for font-size itself). Here are the values for three common base sizes.

Pixels (px) EM (14px base) EM (16px base) EM (18px base)
1px0.0714em0.0625em0.0556em
2px0.1429em0.125em0.1111em
4px0.2857em0.25em0.2222em
6px0.4286em0.375em0.3333em
8px0.5714em0.5em0.4444em
10px0.7143em0.625em0.5556em
12px0.8571em0.75em0.6667em
14px1em0.875em0.7778em
16px1.1429em1em0.8889em
18px1.2857em1.125em1em
20px1.4286em1.25em1.1111em
22px1.5714em1.375em1.2222em
24px1.7143em1.5em1.3333em
28px2em1.75em1.5556em
32px2.2857em2em1.7778em
36px2.5714em2.25em2em
40px2.8571em2.5em2.2222em
48px3.4286em3em2.6667em
56px4em3.5em3.1111em
64px4.5714em4em3.5556em
72px5.1429em4.5em4em

How to Convert PX to EM

em = px ÷ font size of the element

Example: a 24 px heading inside a 16 px paragraph is 24 ÷ 16 = 1.5 em. The same 24 px inside an 18 px block is 24 ÷ 18 = 1.3333 em. For font-size, the base is the parent's font size; for padding, margin and width, it is the element's own font size.

EM vs REM: Which Should You Use?

REM is always relative to the root, so it gives the same result anywhere on the page. EM is relative to the nearest font size, so it is perfect for spacing that should grow with its own text, such as button padding, but it compounds when nested. For most font sizes, rem is the safer choice; see PX to REM.

Frequently Asked Questions (FAQs)

How many em is 16px?

16 px = 1 em when the font size is 16 px, which is the browser default.

What is 24px in em?

24 px = 1.5 em with a 16 px base, or 1.333 em with an 18 px base.

What is the difference between em and rem?

em is relative to the font size of the current element (or its parent for font-size), so it compounds when nested. rem is always relative to the root html font size.

Why does my em value give a different size?

Because em uses the font size of the surrounding element. If a parent is already 1.2em, a 1.2em child becomes 1.44 times the base size.

Does EachConvert store my data?

No. All conversions happen entirely in your browser. The values you enter are never sent to our server or saved.