Pixels to centimetres
Pixels to centimetres and millimetres, and back, with A-series paper in whole pixels.
96 px to the inch, fixed by the CSS spec.
100px ÷ 37.7953 = 2.6458cm (96 px per inch ÷ 2.54)
The same value in every unit
points
75pt
100px ÷ 1.3333 = 75pt (96 px per inch ÷ 72)
inches
1.0417in
100px ÷ 96 = 1.0417in (96 px per inch)
millimetres
26.4583mm
100px ÷ 3.7795 = 26.4583mm (96 px per inch ÷ 25.4)
picas
6.25pc
100px ÷ 16 = 6.25pc (96 px per inch ÷ 6)
In short
In CSS, 1 centimetre is 37.7953 pixels and 1 millimetre is 3.7795 pixels, because an inch is 96 pixels and 2.54 centimetres. For print, divide the resolution by 2.54: at 300 ppi a centimetre is 118.11 pixels, so an A4 page needs 2480 × 3508 pixels.
The formula
CSS: cm = px × 2.54 ÷ 96
px = cm × 96 ÷ 2.54
Print: cm = px × 2.54 ÷ ppi
px = cm × ppi ÷ 2.54
mm = cm × 10Reference tables
Computed by the same code as the converter above.
| pixels | CSS, cm | CSS, mm | Print 300 ppi, cm | Print 300 ppi, mm |
|---|---|---|---|---|
| 1px | 0.0265cm | 0.2646mm | 0.0085cm | 0.0847mm |
| 10px | 0.2646cm | 2.6458mm | 0.0847cm | 0.8467mm |
| 50px | 1.3229cm | 13.2292mm | 0.4233cm | 4.2333mm |
| 96px | 2.54cm | 25.4mm | 0.8128cm | 8.128mm |
| 100px | 2.6458cm | 26.4583mm | 0.8467cm | 8.4667mm |
| 300px | 7.9375cm | 79.375mm | 2.54cm | 25.4mm |
| 500px | 13.2292cm | 132.2917mm | 4.2333cm | 42.3333mm |
| 1000px | 26.4583cm | 264.5833mm | 8.4667cm | 84.6667mm |
| 1920px | 50.8cm | 508mm | 16.256cm | 162.56mm |
| 2480px | 65.6167cm | 656.1667mm | 20.9973cm | 209.9733mm |
| 3508px | 92.8158cm | 928.1583mm | 29.7011cm | 297.0107mm |
| millimetres | CSS | Printed at 150 ppi | Printed at 300 ppi |
|---|---|---|---|
| 1mm | 3.78px | 5.91px | 11.81px |
| 3mm | 11.34px | 17.72px | 35.43px |
| 5mm | 18.9px | 29.53px | 59.06px |
| 10mm | 37.8px | 59.06px | 118.11px |
| 25.4mm | 96px | 150px | 300px |
| 50mm | 188.98px | 295.28px | 590.55px |
| 100mm | 377.95px | 590.55px | 1181.1px |
| 148mm | 559.37px | 874.02px | 1748.03px |
| 210mm | 793.7px | 1240.16px | 2480.31px |
| 297mm | 1122.52px | 1753.94px | 3507.87px |
| 420mm | 1587.4px | 2480.31px | 4960.63px |
Metric print: paper sizes, bleed and the half-pixel
A-series paper is defined in millimetres (ISO 216): A4 is 210 × 297 mm. At 300 ppi that is 2480.31 × 3507.87 pixels, which is why the figure everyone quotes is 2480 × 3508. A pixel cannot be split, so the honest answer is always rounded, and the rounding moves the printed edge by less than half a pixel, under 0.05 mm at 300 ppi.
Printers usually ask for 3 mm of bleed on every side. At 300 ppi that is 35.43 pixels, so 35 or 36 depending on which way you round; add it to both edges, which makes an A4 file with bleed 2551 × 3579 pixels.
CSS millimetres are not real millimetres on screen. A CSS mm is 96 ÷ 25.4 = 3.7795 CSS pixels, and on a phone that will measure noticeably shorter than a millimetre on a ruler. In a print stylesheet, though, CSS mm are physical, which is the one place writing CSS in millimetres makes sense.
Worked examples
Real sizes, with the sums.
An A5 flyer from a 300 ppi file
You give it
148 × 210 mm at 300 ppi.
You get
148 ÷ 25.4 × 300 = 1748.03 and 210 ÷ 25.4 × 300 = 2480.31, so 1748 × 2480 pixels: half an A4 page turned on its side, give or take the half millimetre ISO 216 rounds away.
A business card with bleed
You give it
An 85 × 55 mm card, 3 mm bleed each side, at 300 ppi.
You get
91 × 61 mm including bleed, which is 1074.80 × 720.47 pixels: make the file 1075 × 720 pixels and keep text 3 mm inside the trim.
Questions people ask
Straight answers. Each one links directly: copy the address after opening it.
How many pixels is 1 cm?
In CSS, 37.7953 pixels. For print it depends on the resolution: 59.06 pixels at 150 ppi and 118.11 at 300 ppi.
How many pixels is A4?
At 300 ppi, 2480 × 3508. At 150 ppi, 1240 × 1754. As a CSS page, 794 × 1123 pixels, which is the width a browser lays out an A4 print stylesheet at.
How do I convert mm to px?
Multiply millimetres by 3.7795 for CSS pixels, or by the print resolution divided by 25.4 for an image: at 300 ppi that is 11.811 pixels per millimetre. Choose millimetres in the converter and it does both.
Other unit conversions
Pixel converter
Every unit at once, for CSS, print or this screen.
Pixels to inches
Pixels to inches and back, for CSS, for print, or as measured on your screen.
Pixels to points
Pixels to points and back: move a type size from a design file to a document.
Pixels to rem
Pixels to rem and back, at your real root size, not just the assumed 16.
Pixels to em
Pixels to em and back for a given parent size, with the compounding shown.