Understanding the passport photo pixel calculator — concept and principle
Passport, visa and ID applications increasingly accept digital photos, but each form asks for a photo of a given physical size or a given number of pixels. This calculator converts a photo size in millimetres into pixel dimensions at the resolution you choose, so you can crop and export an image that prints at the right size or meets an upload requirement.
How it is calculated
Resolution in DPI (dots per inch) is the number of pixels per inch of print, and an inch is exactly 25.4 mm. So:
- Width (px) = round(width in mm ÷ 25.4 × DPI)
- Height (px) = round(height in mm ÷ 25.4 × DPI)
- Megapixels = width px × height px ÷ 1,000,000, shown to two decimals
The calculator also shows the pixel size at 600 DPI for high-quality printing.
The principle
A digital image has no physical size until you decide how densely to print it. At 300 DPI, every inch of paper holds 300 pixels in each direction, so a 1-inch photo needs 300 px and a 2-inch photo needs 600 px. Dividing millimetres by 25.4 turns the size into inches, and multiplying by DPI gives pixels. Pixels must be whole, so the result is rounded to the nearest integer. 300 DPI is a common target for photo prints because, at normal viewing distance, finer detail is hard to see.
Worked example
- Inputs: passport photo 35 × 45 mm, resolution 300 DPI.
- Width: 35 ÷ 25.4 × 300 = 413.39, rounded to 413 px.
- Height: 45 ÷ 25.4 × 300 = 531.50 (531.496…), rounded to 531 px.
- Size: 413 × 531 = 219,303 pixels, about 0.22 MP.
- At 600 DPI: 35 ÷ 25.4 × 600 = 826.77 → 827 px and 45 ÷ 25.4 × 600 = 1,062.99 → 1,063 px, so 827 × 1063 px.
How to read the result
Treat the pixel figures as a minimum for printing at that size. Upload systems often set their own rules, such as an exact pixel size, a minimum and maximum, a file-size limit or a required aspect ratio; those rules take priority over a DPI calculation. Keep the 35 : 45 (7 : 9) proportions when cropping so the face is not stretched. Changing only the DPI number in a file's metadata does not add detail; the pixel count is what matters.
Common mistakes
- Upscaling a small phone crop to the target pixels; it meets the number but looks blurry and may be rejected.
- Cropping to the right pixels but the wrong head size. Authorities also specify how large the face must be within the frame.
- Confusing a 3.5 × 4.5 cm passport photo with a 2 × 2 inch (51 × 51 mm) US photo, which is 600 × 600 px at 300 DPI.
Frequently asked questions
How many pixels is a 35 × 45 mm passport photo?
413 × 531 px at 300 DPI, or 827 × 1063 px at 600 DPI.
What pixel size is a US passport photo?
A 2 × 2 inch photo is 600 × 600 px at 300 DPI.
Does DPI matter for online uploads?
Usually only the pixel dimensions and file size matter online. DPI matters when the image is printed.
Sources: ICAO Doc 9303, Machine Readable Travel Documents · NIST Special Publication 811 (2008), Appendix B (1 in = 25.4 mm exactly)