px to rem Converter: px, rem, pt, em, mm
Last updated:
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.
1 px = 0.0625 remAll Results
Quick Reference Table: Pixel → Root em
| Value (px) | Result (rem) |
|---|---|
| 1 px | 0.0625 rem |
| 8 px | 0.5 rem |
| 10 px | 0.625 rem |
| 12 px | 0.75 rem |
| 14 px | 0.875 rem |
| 16 px | 1 rem |
| 18 px | 1.125 rem |
| 20 px | 1.25 rem |
| 24 px | 1.5 rem |
| 32 px | 2 rem |
| 48 px | 3 rem |
| 64 px | 4 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.
| Size | rem | pt | mm |
|---|---|---|---|
| 10 pt text (footnotes) | 0.8333 | 10 | 3.528 |
| Default text size of a browser | 1 | 12 | 4.233 |
| 12 pt text in a word processor | 1 | 12 | 4.233 |
| Default h2 heading | 1.5 | 18 | 6.35 |
| Smallest target size in WCAG 2.2 (2.5.8) | 1.5 | 18 | 6.35 |
| Default h1 heading | 2 | 24 | 8.467 |
| 1 centimeter | 2.362 | 28.35 | 10 |
| 1 inch | 6 | 72 | 25.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.
- 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.
- 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.
- 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.
- 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: