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 × 10

Reference tables

Computed by the same code as the converter above.

Pixels to centimetres and millimetres
pixelsCSS, cmCSS, mmPrint 300 ppi, cmPrint 300 ppi, mm
1px0.0265cm0.2646mm0.0085cm0.0847mm
10px0.2646cm2.6458mm0.0847cm0.8467mm
50px1.3229cm13.2292mm0.4233cm4.2333mm
96px2.54cm25.4mm0.8128cm8.128mm
100px2.6458cm26.4583mm0.8467cm8.4667mm
300px7.9375cm79.375mm2.54cm25.4mm
500px13.2292cm132.2917mm4.2333cm42.3333mm
1000px26.4583cm264.5833mm8.4667cm84.6667mm
1920px50.8cm508mm16.256cm162.56mm
2480px65.6167cm656.1667mm20.9973cm209.9733mm
3508px92.8158cm928.1583mm29.7011cm297.0107mm
Millimetres to pixels
millimetresCSSPrinted at 150 ppiPrinted at 300 ppi
1mm3.78px5.91px11.81px
3mm11.34px17.72px35.43px
5mm18.9px29.53px59.06px
10mm37.8px59.06px118.11px
25.4mm96px150px300px
50mm188.98px295.28px590.55px
100mm377.95px590.55px1181.1px
148mm559.37px874.02px1748.03px
210mm793.7px1240.16px2480.31px
297mm1122.52px1753.94px3507.87px
420mm1587.4px2480.31px4960.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