PX TO EM | WEB TOOLS

1. Enter a base pixel size

px

2. Convert

PX to EM
px
or
EM to PX
em
Convert

3. Result

Select your body font size

Conversions based on 16px browser default size

Pixels EMs Percent Points
6px0.375em37.5%5pt
7px0.438em43.8%5pt
8px0.500em50.0%6pt
9px0.563em56.3%7pt
10px0.625em62.5%8pt
11px0.688em68.8%8pt
12px0.750em75.0%9pt
13px0.813em81.3%10pt
14px0.875em87.5%11pt
15px0.938em93.8%11pt
16px1.000em100.0%12pt
17px1.063em106.3%13pt
18px1.125em112.5%14pt
19px1.188em118.8%14pt
20px1.250em125.0%15pt
21px1.313em131.3%16pt
22px1.375em137.5%17pt
23px1.438em143.8%17pt
24px1.500em150.0%18pt

Voilà! Your conversions

Conversions based on your body font size

Pixels EMs Percent Points
6px1.000em100.0%5pt
7px1.167em116.7%5pt
8px1.333em133.3%6pt
9px1.500em150.0%7pt
10px1.667em166.7%8pt
11px1.833em183.3%8pt
12px2.000em200.0%9pt
13px2.167em216.7%10pt
14px2.333em233.3%11pt
15px2.500em250.0%11pt
16px2.667em266.7%12pt
17px2.833em283.3%13pt
18px3.000em300.0%14pt
19px3.167em316.7%14pt
20px3.333em333.3%15pt
21px3.500em350.0%16pt
22px3.667em366.7%17pt
23px3.833em383.3%17pt
24px4.000em400.0%18pt

Here’s a calculator for your custom EM needs

Generated CSS should make your life simpler

Based on the fantastic Normalize CSS project*


        

Pixels, EMs, and relative units… oh my!

Daunting, but not quite lions, tigers, and bears thanks to PXtoEM.com

What is an EM?

Wikipedia puts it well: "An em is a unit of measurement in the field of typography, equal to the size of the current font." If your font-size is at 16 pixels, then 1em = 16px

For more information visit Wikipedia and Mozilla MDN.

What is the text sizing difference between PX, EM, %, PT?

Pixels and points are static measurements, but commonly used in different mediums. Pixels are used on screens because screens are measured in pixels. Although points can be used on screen, they are the standard in printing because they are a factor of DPI.

Percent and EMs on the other hand are relative measurements. The size of an EM or percentage unit depends on its parent. If body text is sized at 12 pixels, then text set at 120% or 1.2 EM inside the body will be 1.2 * 12, or 14.4 pixels.

How do I convert between PX, EM, %, and PT?

Assuming you aren’t using PXtoEM.com to keep it simple, here are the formulas PXtoEM.com uses.

Note: 16px is used as the body text size in all conversions because that is the browser default. You will change 16px to your base text size.

PX to EM
Formula: size in pixels / parent size in pixels
Example: 12px / 16px = .75em
PX to %
Formula: size in pixels / parent size in pixels * 100
Example: 12px / 16px * 100 = 75%
PX to PT
Formula: size in pixels * (points per inch / pixels per inch)
Example: 16px * (72pt / 96px) = 12pt
EM to PX
Formula: size in EMs * parent size in pixels
Example: .75em * 16px = 12px
EM to %
Formula: size in EMs * 100
Example: .75em * 100 = 75%

is px to em conversion made simple. Choose your body font size in pixels (px)and out comes a complete pixel (px) to em conversion table, making elastic web design with CSS a snap. The once daunting challenge of converting pixels (px) to the elusive em has now been reduced to a booger eating pipsqueak.!

PXtoEM takes it a step further and gives CSS to start with! After you select your body font size, go to "Get CSS" and there you go!

0 comments: