Typography / px → mm
Convert CSS pixels to Millimeters
Convert absolute CSS lengths and desktop-publishing points. Convert CSS pixels (px) to Millimeters (mm). Find the formula, worked examples, unit definitions, and practical guidance below.
Reverse: Millimeters to CSS pixels →
How to convert CSS pixels to millimeters
These use CSS definitions: 1 inch = 96 CSS pixels = 72 points = 6 picas. A CSS pixel is not a physical screen pixel. Relative em, rem, and viewport units need a rendering context and are excluded.
Use x for the value in px, b for the intermediate value in in, and y for the result in mm.
mm = px × 0.010416666666666666 ÷ 0.03937007874015748
Worked examples
10 px ≈ 2.64583333333 mm
Step 1: (10 × 0.0104166666667) ≈ 0.104166666667 in.
Step 2: 0.104166666667 ÷ 0.0393700787402 ≈ 2.64583333333 mm.20 px ≈ 5.29166666667 mm
Step 1: (20 × 0.0104166666667) ≈ 0.208333333333 in.
Step 2: 0.208333333333 ÷ 0.0393700787402 ≈ 5.29166666667 mm.
Results are rounded to 12 significant digits. Converting units does not increase the precision of the original measurement. Very large or small values outside JavaScript’s finite numeric range are rejected.
About CSS pixels
CSS pixels (px) measures typography under the conventions above. The base value in in is (x × 0.0104166666667), where x is the numerical value in px. Factors shown here are rounded for display; calculations use the stored factor.
About Millimeters
Millimeters (mm) measures typography under the conventions above. The base value in in is (x × 0.0393700787402), where x is the numerical value in mm. Factors shown here are rounded for display; calculations use the stored factor.
Definitions and sources
Keep these unit conventions consistent when using measurements in construction calculations.
CSS pixels to millimeters reference table
| CSS pixels (px) | Millimeters (mm) |
|---|---|
| 1 | 0.264583333333 |
| 5 | 1.32291666667 |
| 10 | 2.64583333333 |
| 25 | 6.61458333333 |
| 50 | 13.2291666667 |
| 100 | 26.4583333333 |
| 1000 | 264.583333333 |
Browse every typography conversion →