Print size & DPI calculator
Turn pixels and DPI into a real print size in inches, millimetres and centimetres plus the total megapixels and quality grade, and work backwards from a finished size to the pixels it needs, the effective DPI and the resample factor (a limiting side above 1 means the image must be upscaled). Paper presets such as A4 or a 6-inch photo show the full-page pixel count. With a real image selected it reads the true pixel size and the DPI stored in the file (JFIF density or pHYs chunk, reported as unreadable when absent).
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
The image is read locally for its pixel size and DPI metadata; nothing is uploaded.
The result is shown as text below.
Result
Every line below is the real result of this run — copy them straight out.
Enter pixels and a DPI to calculate.
What this tool does
- Check before submitting: pick a real image and see it is 10 in / 254 mm / 25.4 cm at 300 DPI with a print-quality grade.
- Work back from a finished size: enter 210 × 297 mm and get the 2481 × 3508 px it needs, the effective DPI 362.86 / 171.04 and the 1.754 resample factor that says it must be upscaled.
- Verify the DPI a file claims: JPEG is read from the JFIF density and PNG from the pHYs chunk; whatever is there is reported, and a missing tag is reported as missing.
- Compare with paper: pick A4, a 6-inch photo or a business card and see how many pixels that sheet needs at the current DPI and how far your image is from it.
Example
Input
No image selected, manual 3000x2000, target DPI 300, target size 210 × 297 mm, paper A4
Output
Pixel source: Manual input · 3000x2000 (typed by hand) Real pixel size: 3000 × 2000 px DPI stored in the file: — Target DPI: 300 Print width: 10 in · 254 mm · 25.4 cm Print height: 6.6667 in · 169.33 mm · 16.93 cm Total pixels: 6 MP Quality grade: Print quality (≥300 DPI) Target print size: 210 × 297 mm Pixels needed per side: 210 mm = 8.2677 in → 2481 px Pixels needed per side: 297 mm = 11.6929 in → 3508 px Effective DPI at that size: 362.86 / 171.04 DPI Resample factor: 0.8268 / 1.754
Two more rows follow — the verdict (limiting side 1.754 > 1: this image must be upscaled and will soften) and the paper comparison (A4 (210 × 297 mm) @ 300 DPI → 2481 × 3508 px). With an image selected rows 1–3 turn into the file name, the real pixel size and the DPI stored in the file.
Frequently asked questions
What are the formulas?
inches = pixels ÷ DPI; mm = inches × 25.4; cm = inches × 2.54. The other way, required pixels = mm ÷ 25.4 × DPI, and this tool always rounds **up** so the sheet is never short of a pixel: the width of A4 (210 mm) is exactly 2480.31 px at 300 DPI and becomes 2481 px, while 297 mm is 3507.87 px and becomes 3508 px. Rounding to nearest instead gives 2480 — a one-pixel difference in rounding policy, not a mistake.
Where do effective DPI and the resample factor come from?
Effective DPI = pixels ÷ the inches of the target size. For 3000 × 2000 px across 210 × 297 mm: width 3000 ÷ 8.2677 = 362.86 DPI and height 2000 ÷ 11.6929 = 171.04 DPI. The resample factor = target DPI ÷ effective DPI: width 300 ÷ 362.86 = 0.8268 (can be scaled down) and height 300 ÷ 171.04 = 1.754 (must be upscaled 1.754×, which softens it). The limiting side is the larger of the two because it decides how sharp the print looks.
Does the manual pixel size still count once an image is selected?
No. With an image the decoded real pixel size wins and the first row reads “Pixel source: Image file” with the real dimensions; the manual value is only used when no image is selected. A file the browser cannot decode (HEIC is the usual case) is reported as such and the manual size is used instead — the tool never pretends to have read a size.
Does the DPI stored in the file affect the result?
No. JPEG is read from the JFIF APP0 density field (only trusted when the unit is dots per inch) and PNG from the pHYs chunk (pixels per metre converted to DPI); GIF and WebP have no equivalent field and are reported as unreadable. The figure is reference only — every calculation uses the target DPI you pick on the page.
How are the quality grades defined?
300 DPI and above is print quality (the usual standard for printing and photo labs), 200–299 is photo quality, 96–199 is screen quality, and below 96 is low, only suitable from a distance. The grade depends on the target DPI you enter, not on the image itself.
Keywords:print size calculatordpi calculatorppi to print sizepixels to inchesprint resolution