Pixels, inches, cm and DPI explained

A pixel is a dot of colour with no fixed physical size. It only gets one when you decide how many pixels go into each inch, and that number is the DPI (or PPI). Then inches = pixels ÷ DPI, and the other way round,pixels = inches × DPI.

For centimetres, divide by 2.54 first: one inch is exactly 2.54 cm. So 1200 pixels at 300 DPI print 4 inches (10.16 cm) wide.

The formula, both ways

You usually need one of two answers: how big an image you already have will print, or how many pixels you need for a print size someone has given you.

Work out each side separately. Width and height use the same DPI, so a print keeps the image's shape only if the paper's shape matches the image's; otherwise something has to be cropped or left blank. Thepixels to inches converter does the arithmetic as you type, in inches, centimetres and millimetres.

The 2.54 is not an approximation. The W3C's CSS units specification, for one, defines the inch that way: “1in = 2.54cm = 96px”.

Worked examples from real resizes

These come from running this site's print-size tools on one large test photo, a 4000 × 3000 px synthetic image rather than a camera picture. Each time, the tool turned a physical size and a DPI into pixels using the formula above.

Notice what halving the DPI did: half the pixels across, half down, so about a quarter of the pixels in total, and a much smaller file. DPI is the lever that links print size to pixel count, and pixel count is what drives file size.

Pixels needed for common print sizes

Straight from the formula, rounded to whole pixels. The 300 and 150 columns are only examples; use the figure your printer, print service or form actually asks for.

Print sizeAt 300 DPIAt 150 DPI
2 × 2 in600 × 600 px300 × 300 px
4 × 6 in1200 × 1800 px600 × 900 px
5 × 7 in1500 × 2100 px750 × 1050 px
8 × 10 in2400 × 3000 px1200 × 1500 px
10 × 15 cm1181 × 1772 px591 × 886 px
35 × 45 mm413 × 531 px207 × 266 px

Going the other way, a 4000 × 3000 px photo covers 13.33 × 10 inches (33.87 × 25.4 cm) at 300 DPI, and twice that in each direction at 150 DPI. If you need a document-specific size, such as a passport photo, the official requirements for each country are in the passport photo size guide.

What if you do not have enough pixels?

Say a print needs 2400 × 3000 px and your image is 1200 × 1500. You have three honest options:

  1. Print smaller. At the same DPI, 1200 × 1500 px gives a 4 × 5 inch print.
  2. Accept a lower DPI. Stretching 1200 px across 8 inches means 150 pixels per inch. Each pixel is printed larger, so the result is less crisp. Whether that is acceptable depends on the print and how closely it is viewed.
  3. Enlarge the image. The image enlarger can double the pixels, but it cannot add detail, so the print looks much like option 2.

What does not help is typing a higher DPI into the file on its own. That changes the stated print size, not the number of pixels. The DPI vs PPI guide shows this with a measured file.

Inches on a screen are different

On a screen, an image is a number of pixels, and how large those look depends on the display and its zoom setting. Web pages add their own unit: in CSS, an inch is defined as 96 CSS pixels, a reference size rather than a physical one. The specification notes that “for reading at arm's length, 1px thus corresponds to about 0.26 mm (1/96 inch)”. A “1 inch” box on a web page is therefore not exactly an inch on your ruler, and that is by design.

So for screen use, think only in pixels. For print, think in inches or centimetres plus a DPI, and convert.

Tools for each step

Sources

  1. CSS Values and Units Module Level 4, absolute lengths, W3C. Checked December 2026.

Browse all image guides