Convert cm, mm and Inches to Pixels (With Tables)
Pixels = inches × DPI. Everything else is converting your unit to inches first.
A size on paper becomes a size in pixels only once you choose a DPI. With the DPI fixed, the conversion is one line of arithmetic.
The formulas
- From inches: pixels = inches × DPI
- From centimetres: pixels = cm ÷ 2.54 × DPI
- From millimetres: pixels = mm ÷ 25.4 × DPI
Round the result to the nearest whole pixel. One inch is exactly 2.54 cm, so these are exact, not approximations.
Example: 3.5 × 4.5 cm at 300 dpi. 3.5 ÷ 2.54 × 300 = 413.4, so 413 pixels wide. 4.5 ÷ 2.54 × 300 = 531.496, so 531 pixels high.
Common photo sizes
| Size | 200 dpi | 300 dpi | 600 dpi |
|---|---|---|---|
| 2 × 2.5 cm (stamp size) | 157 × 197 | 236 × 295 | 472 × 591 |
| 2 × 3 cm | 157 × 236 | 236 × 354 | 472 × 709 |
| 3 × 4 cm | 236 × 315 | 354 × 472 | 709 × 945 |
| 3.5 × 4.5 cm (passport size) | 276 × 354 | 413 × 531 | 827 × 1063 |
| 4 × 6 cm | 315 × 472 | 472 × 709 | 945 × 1417 |
| 1 × 1 in | 200 × 200 | 300 × 300 | 600 × 600 |
| 2 × 2 in (51 × 51 mm) | 400 × 400 | 600 × 600 | 1200 × 1200 |
| 4 × 6 in (postcard) | 800 × 1200 | 1200 × 1800 | 2400 × 3600 |
One centimetre, one millimetre, one inch
| Unit | 200 dpi | 300 dpi | 600 dpi |
|---|---|---|---|
| 1 mm | 7.87 px | 11.81 px | 23.62 px |
| 1 cm | 78.74 px | 118.11 px | 236.22 px |
| 1 inch | 200 px | 300 px | 600 px |
Going the other way
To find how large a photo prints, divide: inches = pixels ÷ DPI, and cm = pixels ÷ DPI × 2.54. A 600 × 600 pixel photo prints at 2 × 2 inches at 300 dpi, or 3 × 3 inches at 200 dpi.
Which DPI to use
- 300 dpi unless you are told otherwise. It is the usual quality for printed photos.
- 200 dpi when a form wants a small file and still names a print size; the photo is smaller in pixels and so in KB.
- 600 dpi only when asked. It quadruples the pixels compared with 300 dpi, and with them the file size.
You can do all of this in one step with the cm tool, the mm tool or the inches tool.