Skip to content

CM to Pixel

Pixels per inch: 96 for CSS screens, 300 for photo print.

Pixels —
Exact pixel value
—
Length in inches
—
Pixels per centimetre
—
Pixels needed at 300 PPI
—

Pixels equal centimetres divided by 2.54, multiplied by the resolution in pixels per inch. A 10 cm edge printed at 300 PPI needs 10 ÷ 2.54 × 300 = 1181 pixels; on a screen using the CSS reference of 96 PPI, the same 10 cm is about 378 pixels.

About this tool

A centimetre has no fixed pixel count. The answer depends on how densely the pixels are packed, so every conversion needs a resolution. Designers preparing print files, photographers checking whether an image is large enough for a 15 cm print, and developers turning a physical mock-up into CSS sizes all face the same sum. Enter a length and a resolution and the tool gives the whole-pixel count, the unrounded value, the length in inches, the pixel density per centimetre and, for comparison, the count at 300 PPI, the usual photo-print standard. One limit: a monitor's real pixel density varies by model, so a 96 PPI result tells you the CSS size, not how many centimetres the element will measure on a particular screen.

How to use it

  1. Enter the length

    Type the physical size in centimetres, such as 21 for the width of an A4 sheet.

  2. Set the resolution

    Use 300 PPI for photo print, 150 for posters seen from a distance, or 96 for CSS screen units.

  3. Read the pixel count

    The headline is rounded to whole pixels; the exact value and the working are listed below it.

Examples

2.54 cm at 96 PPI

Length
2.54
Resolution
96

Result Pixels: 96
Exact pixel value: 96
Length in inches: 1
Pixels per centimetre: 37.8
Pixels needed at 300 PPI: 300

  1. Inches = 2.54 cm ÷ 2.54 = 1 in
  2. Pixels = 1 in × 96 PPI = 96 px
  3. Rounded to whole pixels: 96 px

One inch at the CSS reference resolution is exactly 96 pixels, the figure browsers use for physical units.

10 cm at 300 PPI

Length
10
Resolution
300

Result Pixels: 1,181
Exact pixel value: 1,181.1
Length in inches: 3.937
Pixels per centimetre: 118.11
Pixels needed at 300 PPI: 1,181

  1. Inches = 10 cm ÷ 2.54 = 3.937 in
  2. Pixels = 3.937 in × 300 PPI = 1181.1 px
  3. Rounded to whole pixels: 1181 px

10 ÷ 2.54 = 3.937 in, times 300 gives 1181.1, so a 10 cm print edge needs about 1181 pixels.

A4 width (21 cm) at 150 PPI

Length
21
Resolution
150

Result Pixels: 1,240
Exact pixel value: 1,240.16
Length in inches: 8.2677
Pixels per centimetre: 59.06
Pixels needed at 300 PPI: 2,480

  1. Inches = 21 cm ÷ 2.54 = 8.2677 in
  2. Pixels = 8.2677 in × 150 PPI = 1240.16 px
  3. Rounded to whole pixels: 1240 px

21 ÷ 2.54 × 150 = 1240.2, the pixel width of an A4 page scanned or exported at 150 PPI.

How it is calculated

px = (cm ÷ 2.54) × PPI

cm
Length in centimetres
2.54
Centimetres in one inch, exact by definition
PPI
Pixels per inch of the output
px
Length in pixels

Resolution is quoted per inch, so the length is first turned into inches using the exact international definition of 2.54 cm per inch. Multiplying by the pixel density gives the pixel count. Images can only hold whole pixels, so the result is rounded to the nearest integer; the unrounded figure is kept so you can see how close it was.

When not to use it

  • Do not use 96 PPI to predict the physical size on a specific phone or monitor.
  • Vector artwork has no pixel count until it is exported, so convert at export time.

Common mistakes

  • Leaving the resolution at 72 PPI for a print file, which yields a soft print.
  • Confusing printer DPI (ink dots) with image PPI (pixels).
  • Rounding each side down before cropping, which shifts the aspect ratio slightly.

Frequently asked questions

How many pixels are in one centimetre?

It depends on resolution. At 96 PPI one centimetre is about 37.8 pixels, at 300 PPI about 118.1 pixels, and at 72 PPI about 28.3 pixels.

Why does CSS use 96 pixels per inch?

The CSS specification defines a reference pixel so that 1in equals 96px and 1cm equals about 37.8px. Browsers map that unit to the device, so physical CSS units rarely match a ruler exactly.

What resolution should a photo print use?

300 PPI is the common target for prints viewed at arm's length. Large posters seen from a few metres away often look fine at 150 PPI or lower, because the eye cannot resolve finer detail at that distance.

Is PPI the same as DPI?

Not strictly. PPI counts image pixels per inch, while DPI counts ink dots a printer lays down. Many programs label the image setting DPI anyway, and for this conversion you enter the pixel figure.

How do I size both sides of a print?

Convert the width and the height separately with the same resolution. A 15 by 10 cm print at 300 PPI needs 1772 by 1181 pixels.

Does changing the PPI setting in an image editor change the pixels?

Only if resampling is switched on. With resampling off, the editor changes the print size and keeps the pixel count, which is the same relationship this formula describes.

Cite this tool

Using this tool in an assignment, article or report? Copy a citation, or a link for your website.

APA

Tools Directory Editorial Team. (2026, October 27). CM to Pixel. Tools Directory. Retrieved October 27, 2026, from https://tools.milunir.com/photography/image-size-and-print/cm-to-pixel/

MLA

Tools Directory Editorial Team. “CM to Pixel.” Tools Directory, 27 Oct. 2026, https://tools.milunir.com/photography/image-size-and-print/cm-to-pixel/. Accessed 27 Oct. 2026.

Chicago

Tools Directory Editorial Team. “CM to Pixel.” Tools Directory. Last modified October 27, 2026. Accessed October 27, 2026. https://tools.milunir.com/photography/image-size-and-print/cm-to-pixel/.

Link<a href="https://tools.milunir.com/photography/image-size-and-print/cm-to-pixel/">CM to Pixel – Tools Directory</a>