px to rem Converter: px, rem, pt, em, mm

Last updated:

px

rem is measured against this size, and here so are em and %. In CSS they follow the parent element, so they match rem only where no parent changes the font size.

Formula
1 px = 0.0625 rem

All Results

px 1
rem 0.0625
em 0.0625
% 6.25
pt 0.75
pc 0.0625
in 0.0104167
cm 0.0264583
mm 0.264583

Quick Reference Table: Pixel → Root em

Value (px)Result (rem)
10.0625 rem
80.5 rem
100.625 rem
120.75 rem
140.875 rem
161 rem
181.125 rem
201.25 rem
241.5 rem
322 rem
483 rem
644 rem

About px, rem and pt

CSS fixes 1 inch at 96 px, so 1 pt, which is 1/72 inch, equals 1.333 px, and 1 mm equals 3.78 px. rem and em are relative: 1 rem is the root font size, 16 px in every major browser unless the visitor changes it, so 24 px is 1.5 rem. If a stylesheet sets another root size, enter it as the base above the fields. em follows the font size of the parent element, so it equals rem only where no parent changes it.

Common text and element sizes

At the default base of 16 px. CSS fixes 1 inch at 96 px, so the pt and mm columns stay the same at any base; only the rem column changes with it.

Sizeremptmm
10 pt text (footnotes)0.8333103.528
Default text size of a browser1124.233
12 pt text in a word processor1124.233
Default h2 heading1.5186.35
Smallest target size in WCAG 2.2 (2.5.8)1.5186.35
Default h1 heading2248.467
1 centimeter2.36228.3510
1 inch67225.4

History of the point and the pixel

Type was measured in points long before screens: type founders needed one unit to cast letters that line up. Computers settled the point at 1/72 inch.

  1. Pierre-Simon Fournier published a table of type sizes measured in typographic points: its scale divided the inch into 12 lines and each line into 6 points.
  2. The Type Founders' Association of the United States adopted a point system for type bodies, in which a nonpareil is 6 points and a pica 12.
  3. Adobe introduced PostScript, whose unit of length on the page is 1/72 inch: in Adobe's words, approximately the same as the point used in printing.
  4. CSS 2.1 became a W3C Recommendation. It fixes 1 inch at 96 px and 72 pt, so 1 px is 0.75 pt, and bases the pixel on one dot of a 96 dpi screen seen at arm's length.

Sources: