DPI, PPI and image resolution for printing
An image file has a number of pixels across and a number of pixels down, and nothing else that determines how sharp it will print. Resolution is what you get when those pixels are spread over a physical width: the same 3000 pixels make a sharp 10 inch print or a soft 40 inch one. Three different quantities get called "DPI" in conversation, and keeping them apart is most of the work.
Three quantities#
PPI, pixels per inch, describes an image at a chosen output size: pixel count divided by printed inches. It is the number that decides whether a print looks sharp. An image has no PPI on its own; it has pixels, and PPI appears the moment you decide how large to print them.
DPI, dots per inch, describes a printer. An inkjet lays down tiny dots of a few ink colours, typically 1200 to 2880 per inch, and simulates each image pixel with a cluster of them. A 300 PPI image printed on a 1440 DPI printer is still a 300 PPI image. Printer DPI only needs to be several times higher than the image PPI, and on any modern printer it is.
LPI, lines per inch, describes a halftone screen on a press: the spacing of the dot grid that reproduces tones with solid ink. Newspapers run around 85 LPI, magazines around 133 to 175 LPI. Prepress uses a rule of thumb that an image should carry about twice the screen frequency in pixels, so a 150 LPI press job wants roughly 300 PPI images. That rule is where the 300 figure comes from.
Printers and print shops often say DPI when they mean PPI, and print specifications of "300 DPI" are asking for 300 pixels per inch at the final size. Read every such specification as PPI.
The formula#
Everything reduces to one relationship: pixels = inches × PPI. Rearranged, PPI = pixels ÷ inches and inches = pixels ÷ PPI. Millimetres convert at exactly 25.4 per inch.
Worked examples, all with the same 3000 × 2000 px photograph:
- Printed at 300 PPI it measures 3000 ÷ 300 = 10 in by 2000 ÷ 300 = 6.67 in, or 254 × 169.3 mm.
- Enlarged to the width of A3 (420 mm = 16.54 in) it reaches 3000 ÷ 16.54 = 181 PPI: good on a wall, soft when held.
- To fill an A4 page (210 × 297 mm) at 300 PPI an image needs 2480 × 3508 px; this photograph has only 2000 px on its short side, so it would print at 2000 ÷ 11.69 = 171 PPI in portrait.
The DPI calculator solves the formula in any direction and reports the nearest paper size; the paper size to pixels calculator lists every standard sheet at a chosen resolution.
The resolution tag changes nothing#
Image files carry a resolution tag: JPEG stores it in the JFIF or EXIF header, PNG in the pHYs chunk, TIFF in XResolution and YResolution. The tag is a suggestion to software about what physical size to assume. It does not touch the pixels.
Take the 3000 × 2000 px file above and change its tag from 300 to 72 PPI without resampling. The pixel count is still 3000 × 2000. The only effect is that a page-layout program opening the file will now propose 41.67 × 27.78 in as its natural size instead of 10 × 6.67 in. Set the tag back to 300 and the proposal returns to 10 × 6.67 in. Set it to 1000 and the program proposes 3 × 2 in. The print will be exactly as sharp in all three cases once it is placed at the same physical size, because the pixels are the same.
The myth that an image "is 72 DPI" and therefore cannot be printed comes from reading this tag as a property of the image. Check the pixel dimensions instead. A 72 PPI tagged file of 4000 × 6000 px prints a sharp A3; a 300 PPI tagged file of 600 × 400 px does not print a sharp anything larger than 2 × 1.3 in.
How much resolution a print needs#
The sharpness a viewer can perceive falls off with distance, so the right PPI depends on how the print is looked at. These are practical targets used across the print industry, not standards.
| Typical viewing distance | Target PPI at final size | |
|---|---|---|
| Books, brochures, photo prints, business cards | 30 to 50 cm, in the hand | 300 (240 is acceptable for photographs) |
| Fine art and photo-quality inkjet | in the hand, inspected closely | 300 to 360 |
| Posters, point-of-sale displays | 1 to 2 m | 150 to 200 |
| Banners, exhibition graphics | 2 to 5 m | 50 to 100 |
| Billboards | 10 m and more | 10 to 20 |
| Line art and text as images | any | 600 to 1200, or use vector |
The line-art row is the exception that matters. Hard edges show pixelation long before continuous tones do, so a scanned signature, a logo supplied as a bitmap or text rendered to an image needs two to four times the resolution of a photograph. Better still, keep such elements as vectors.
Resampling and upscaling#
Resampling changes the pixel count. Downsampling (fewer pixels) discards information and is harmless when the original has more than the print needs; a 24 megapixel photograph resampled to 2480 × 3508 px for an A4 page loses nothing visible. Upsampling (more pixels) invents information. Classical interpolation (bicubic, Lanczos) produces a smoother but not a sharper image: edges stay soft, because no detail was present to recover. Machine-learning upscalers synthesise plausible detail and can produce convincing results on photographs of common subjects; they also invent texture that was never there, which matters for product shots, faces and anything evidential. Either way, upsampling is a last resort for a print that would otherwise be too soft, not a substitute for a larger original.
Screens#
CSS defines the reference pixel so that 96 px make one inch, and that is the unit web browsers use for in, mm and pt in stylesheets. Physical screens have their own density: a laptop at 150 pixels per inch, a phone at 450. The browser bridges the two with the device pixel ratio, so a 100 CSS px box is drawn with 200 or 300 physical pixels on a dense display. For images shown on screen, resolution therefore means "enough pixels for the largest device pixel ratio you serve", and the PPI tag is ignored entirely.
The old advice to "save at 72 DPI for the web" dates from the first Macintosh, whose screen had 72 pixels per inch so that a 12 pt font was 12 px tall. Nothing on the web reads the tag, so the setting has no effect on a web image. What matters is the pixel count and the file size.
Scanning#
A scanner's resolution setting is PPI measured on the original. Scan at the resolution the output needs, scaled by the enlargement. To print a 4 × 6 in photograph at the same size and 300 PPI, scan at 300 PPI, which gives 1200 × 1800 px. To print it at 8 × 12 in, scan at 600 PPI, which gives 2400 × 3600 px and 300 PPI at the larger size. Scanning at higher resolution than the enlargement needs costs storage without adding sharpness beyond what the original holds; 35 mm film and small prints run out of real detail somewhere between 2400 and 4000 PPI on the original.
Vector and raster#
Resolution applies to raster images: grids of pixels. Vector graphics (type, logos drawn as paths, charts, SVG, the drawing operators inside a PDF) are stored as geometry and rendered at whatever resolution the output device has, so they are sharp at any size. A PDF page can mix both: its text and line work scale without loss, and each placed image has its own effective PPI, which prepress tools report per image. Converting a logo to a bitmap is the most common way to lose that advantage; keeping it as vector costs nothing and prints cleanly at every size.
Checking an image's pixel dimensions#
Every operating system shows pixel dimensions in the file's properties or information panel. On the command line and in code:
# ImageMagick: width, height, and the resolution tag if any
magick identify -format "%w x %h px, %x x %y %U\n" photo.jpg
# ExifTool: dimensions and resolution tags from any format
exiftool -ImageWidth -ImageHeight -XResolution -YResolution -ResolutionUnit photo.jpgfrom PIL import Image
with Image.open("photo.jpg") as im:
width, height = im.size
tag = im.info.get("dpi") # the resolution tag, if present; not the real sharpness
print(width, height, tag)
print(f"At 300 PPI: {width / 300:.2f} x {height / 300:.2f} in")Treat the tag as informational and compute the printable size from the pixel count. If the number of pixels divided by the intended inches lands above the target in the table, the image is fine; if not, print smaller, find a larger original, or accept the softness knowingly. Colour is the other half of print preparation, covered on the RGB versus CMYK page, and the A4 page gives the pixel counts for the most common sheet at every resolution.