Typography / cm → px
Convert Centimeters to CSS pixels
Convert absolute CSS lengths and desktop-publishing points. Convert Centimeters (cm) to CSS pixels (px). Find the formula, worked examples, unit definitions, and practical guidance below.
Reverse: CSS pixels to Centimeters →
How to convert centimeters to CSS pixels
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 cm, b for the intermediate value in in, and y for the result in px.
px = cm × 0.39370078740157477 ÷ 0.010416666666666666
Worked examples
10 cm ≈ 377.952755906 px
Step 1: (10 × 0.393700787402) ≈ 3.93700787402 in.
Step 2: 3.93700787402 ÷ 0.0104166666667 ≈ 377.952755906 px.20 cm ≈ 755.905511811 px
Step 1: (20 × 0.393700787402) ≈ 7.87401574803 in.
Step 2: 7.87401574803 ÷ 0.0104166666667 ≈ 755.905511811 px.
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 Centimeters
Centimeters (cm) measures typography under the conventions above. The base value in in is (x × 0.393700787402), where x is the numerical value in cm. Factors shown here are rounded for display; calculations use the stored factor.
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.
Definitions and sources
Keep these unit conventions consistent when using measurements in construction calculations.
Centimeters to CSS pixels reference table
| Centimeters (cm) | CSS pixels (px) |
|---|---|
| 1 | 37.7952755906 |
| 5 | 188.976377953 |
| 10 | 377.952755906 |
| 25 | 944.881889764 |
| 50 | 1889.76377953 |
| 100 | 3779.52755906 |
| 1000 | 37795.2755906 |
Browse every typography conversion →