How to convert pixels to inches
To convert pixels to inches, divide the number of pixels by the resolution in DPI (dots per inch). A 1920-pixel-wide image is 20 inches at 96 DPI, 26.67 inches at 72 DPI and 6.4 inches at 300 DPI. The converter above does the math for inches, centimeters, millimeters and points at once.
To get centimeters, multiply the inches by 2.54. To get typographic points, multiply the inches by 72. For example, a 1200-pixel image at 300 DPI is 4 inches, 10.16 cm or 288 points wide. Millimeters are centimeters times ten, so the same image is 101.6 mm wide.
On the web, CSS defines 1 inch as exactly 96 pixels, which is why 96 DPI is the screen default (W3C CSS Values).
How many pixels are in an inch?
There is no fixed number for files. Physical screens have their own pixel density, which the PPI calculator works out from resolution and screen size. One inch holds 96 pixels at 96 DPI, 72 pixels at 72 DPI and 300 pixels at 300 DPI. Pixels only get a physical size once a DPI is set for printing or layout.
Pixels to inches for printing
For prints, use 300 DPI: a 3000 × 2400 pixel photo prints at 10 × 8 inches. To check that a photo’s shape matches the paper, use the aspect ratio calculator. To go the other way, the inches to pixels converter gives the pixel size a print needs, and the DPI and print size calculator checks print quality. To store a new DPI value in a file, use change DPI.