Unit converters
Typography Converter
Convert CSS type units. The root font size starts at 16 px, and you can change it. em and percent follow that root.
rem, em, and percent use this root. px, pt, pica, in, mm, and cm do not. The starting value is 16 px.
rem = px ÷ 16
Root font size is 16 px. rem equals that root. em and percent use the same root, which assumes the parent font size equals the root, so 1 em = 1 rem = 100%. px, pt, pica, in, mm, and cm are CSS absolute units and do not change with the root. The starting root on this page is 16 px.
Common conversions
These examples use the same factors as the converter. Choose one to fill the fields.
| From | To | Result | Use example |
|---|---|---|---|
| 16 px | Rem (root font size) | 1 rem | |
| 1 in | Pixel (px) | 96 px | |
| 12 pt | Pica (pc) | 1 pica | |
| 1 rem | Pixel (px) | 16 px | |
| 100 % | Pixel (px) | 16 px | |
| 1 em | Rem (root font size) | 1 rem |
Conversion reference
px, pt, pica, in, mm, and cm are CSS absolute units. rem, em, and percent follow the root font size above. Rounded figures in the result use the decimal-place control.
| Unit | Symbol | Relation |
|---|---|---|
| Pixel (px) | px | Base unit. 1 px = 1/96 in in CSS. |
| Point (pt) | pt | 1 pt = 1/72 in = 4/3 px |
| Pica (pc) | pica | 1 pica = 12 pt = 16 px |
| Inch (in) | in | 1 in = 96 px |
| Millimeter (mm) | mm | 1 mm = 96 ÷ 25.4 px |
| Centimeter (cm) | cm | 1 cm = 96 ÷ 2.54 px |
| Em (parent = root) | em | 1 em = 16 px when the parent font size equals the root |
| Rem (root font size) | rem | 1 rem = 16 px at this root font size |
| Percent of root (%) | % | 1% = 0.16 px. 100% equals the root font size. |
How it works
CSS absolute units are tied to the reference pixel. 1 px is 1/96 in, 1 pt is 1/72 in, and 1 pica is 12 pt, which is 16 px. One inch is 2.54 cm. These are CSS lengths, not a ruler held against a monitor.
rem is the root element's font size. em and a font-size percentage are relative to the parent font size. This page assumes that parent equals the root, so 1 em = 1 rem = 100%. The root starts at 16 px, the usual browser default for the CSS medium size, and the field on the converter changes it.
Changing the root changes em, rem, and percent. It does not change px, pt, pica, in, mm, or cm. At 16 px, 16 px is 1 rem. At 20 px, 20 px is 1 rem, and 1 in is still 96 px.
Formulas
These conversions multiply by an exact factor of the CSS pixel. The relations below are read from the unit table.
- Base unit. 1 px = 1/96 in in CSS.
- 1 pt = 1/72 in = 4/3 px
- 1 pica = 12 pt = 16 px
- 1 in = 96 px
- 1 mm = 96 ÷ 25.4 px
- 1 cm = 96 ÷ 2.54 px
- 1 em = 16 px when the parent font size equals the root
- 1 rem = 16 px at this root font size
- 1% = 0.16 px. 100% equals the root font size.
Worked examples
16 px = 1 rem
rem = px ÷ 16
1 in = 96 px
px = in × 96
FAQ
Why does 1 inch equal 96 pixels?
CSS defines the reference pixel as 1/96 of an inch. One point is 1/72 of an inch, so 1 pt = 4/3 px. This is a CSS length, not a physical inch measured on a screen.
What root font size does this page start with?
16 px, the usual browser default for the CSS initial size, medium. Change the root font size field to use another root. rem, em, and percent follow that number.
Are em and rem the same?
rem is the root font size. em and a font-size percentage follow the parent font size. This page assumes the parent equals the root, so 1 em = 1 rem = 100%. A stylesheet whose parent is a different size will not match that em or percent result.
What is a pica?
In CSS, 1 pica is 12 points. One point is 1/72 inch, so 1 pica is 1/6 inch, which is 16 px.
Does changing the root change inches and points?
No. Pixels, points, picas, inches, millimeters, and centimeters stay on the CSS absolute scale. Only em, rem, and percent change with the root.
Factor sources
- CSS Values and Units Module Level 4, absolute lengths: 1 px = 1/96 in, 1 pt = 1/72 in, 1 pc = 12 pt, and 1 in = 2.54 cm.
- CSS font-relative lengths: rem is the root font size. em, and a font-size percentage, are relative to the parent font size. This page sets that parent equal to the root.
- The starting root is 16 px, the usual browser default for the CSS initial font size, medium.