image · 7 min read

Pixels, inches and DPI — what image size actually means

Someone has asked you for the image at 300 dpi. The image does not have a dpi, and nothing you do in an export dialog will give it one.

A digital image has exactly one real dimension: how many pixels wide and how many tall. That is the whole of it. Everything else — inches, centimetres, dpi, ppi — is a statement about how large you would like it printed, and a printed size is not a property of a file.

What the DPI number in a file actually is

Most image formats have a field for resolution. It is metadata: a note, written alongside the pixels, saying "when printing, put this many of my pixels in each inch". Changing it changes the note. It does not change a single pixel.

So an image at 1,200 by 1,800 pixels is the same image whether its note says 72 or 300. Open the export dialog, type 300 where it said 72, and you have edited a comment.

This is why "can you send it at 300 dpi" is, strictly, an unanswerable request, and why answering it by editing the field satisfies the dialog and disappoints the printer. What the person means is "send me enough pixels", and that is a question with a real answer.

The one calculation

Pixels divided by dpi gives inches. That is the entire relationship, and rearranging it answers every version of the question.

one file — 1,800 × 1,200 px — printed three ways300 dpi6 × 4 inchesa photo print300 dpi12 × 8 inchesa magazine spread150 dpi25 × 16.7 inchesa poster72 dpi1,800 px ÷ inches wide = dpi. The file is identical in all three rows.
Nothing about the file changes between these rows — same 1,800 × 1,200 pixels throughout. Only the printed size changes, and the density falls out of the division. Which is why editing the dpi field achieves nothing: it is the answer, not the input.

Multiply the printed size you want by the density you need, and you have the pixels required. A 6 × 4 inch photograph at 300 dpi needs 1,800 × 1,200 pixels — which is 2.2 megapixels, comfortably inside any phone camera of the last fifteen years.

An A4 page at 300 dpi needs 2,480 × 3,508. A billboard needs far less density than any of this, because nobody stands six inches from a billboard, and print shops routinely work at 20 dpi for them.

Where 72 came from

The number is a fossil. Early Macintosh screens were built at 72 pixels per inch specifically so that a point in a document — 1/72 of an inch, the typographer's unit — mapped to exactly one screen pixel. Text at 12 point occupied 12 pixels, and what you saw was what you got.

That correspondence held for about a decade and has been false ever since. Screens now run anywhere from roughly 90 to over 500 pixels per inch, and the operating system scales the interface independently of all of it.

The 72 survives as the default value software writes into the resolution field when nothing better is known, which is what gives people the impression that images from the web are "72 dpi" and therefore unusable. They are not 72 dpi. They have a note saying 72, and they have however many pixels they have — which is the only thing that matters.

Screens, and the number that does matter there

On screen, dpi is irrelevant and device pixel ratio is not. A phone advertising a 390-point-wide viewport may have three physical pixels for each of those points, so an image displayed 390 wide needs to be around 1,170 pixels to look sharp on it.

This is the reason a picture that looks fine on a laptop looks soft on a phone, which is the opposite of what people expect. The phone has the denser screen.

The practical rule for the web is to supply about twice the display width, and stop there. Three times is visible only on the densest screens and costs the file size regardless of who is looking.

Upscaling, and why it adds nothing

Enlarging an image invents pixels by interpolating between the ones you have. It can produce a larger file that looks smoother, and it cannot produce detail that was never recorded, because the detail is not somewhere else — it does not exist.

Machine-learning upscalers are genuinely better at this, and it is worth being clear about what they do: they hallucinate plausible detail based on what similar images tend to look like. For a background texture that is fine. For a document, a face or a number plate it is inventing content, and the invented content is convincing, which is the dangerous part.

The short version

Count pixels, not dots per inch. For print, multiply the size you want by 300 and check you have that many. For the web, take the widest the image will ever be displayed and resize to about double it.

And if someone asks for 300 dpi, ask what size they are printing. The answer to that is a pixel count, which is a thing your file either has or does not.

Questions

What does 300 dpi actually mean?

It is a printing density, not a property of the file. An image has one real dimension — its pixel count — and dpi is a note stored beside it saying how many of those pixels to put in each printed inch. Pixels divided by dpi gives inches, and that is the whole relationship.

How do I change an image to 300 dpi?

Editing the field changes a note and no pixels. What the person asking usually means is “send enough pixels”, and the answer to that is arithmetic: multiply the printed size you want by 300. A 6 × 4 inch print at 300 dpi needs 1,800 × 1,200 pixels.

Are web images really 72 dpi?

No. 72 is a default value software writes when nothing better is known, left over from early Macintosh screens where one point equalled one pixel. That correspondence has been false for decades. The image has however many pixels it has, which is the only figure that matters.

Why does my image look sharp on a laptop and blurry on a phone?

The phone has the denser screen. A device may pack three physical pixels into each layout point, so an image displayed 390 wide needs around 1,170 real pixels to look sharp. Supplying about twice the display width covers almost every device.

Can I increase an image’s resolution?

You can enlarge it, which invents pixels by interpolating between the ones you have. It cannot recover detail that was never recorded. Machine-learning upscalers do better by hallucinating plausible detail — fine for a texture, dangerous for a face, a document or a number plate.

Tools from this guide