How to Calculate Image DPI
Calculating image DPI takes two numbers: the pixel dimension and the physical print size. Nothing else is involved — not the file format, not the camera brand, and not the DPI number stored in the file. If you know pixels and inches, you know DPI.
The formula
DPI = Pixel dimension / Print dimension in inches
Do it twice, once for each direction:
- Horizontal DPI = pixel width / print width in inches
- Vertical DPI = pixel height / print height in inches
If the two results match, the image and the print share an aspect ratio and the image fills the print exactly. If they differ, the shapes do not match, and you will need to crop, leave a border, or accept stretching. Always check both directions; a single number hides this problem.
Step by step
- Find the pixel dimensions. In most image viewers, right-click the file and open its properties or info panel. You need both numbers, for example 3000 × 2000 px. If you only have a file on your device, upload it to the DPI Calculator and it will read the dimensions for you.
- Decide the print size in inches. For example, 10 inches wide. If your size is in centimetres, divide by 2.54. If it is in millimetres, divide by 25.4. A 25.4 cm print width is 10 inches; a 254 mm print width is also 10 inches.
- Divide. 3000 / 10 = 300 DPI.
- Repeat for height. 2000 / 6.67 = 300 DPI. Both directions agree, so this image fits a 10 × 6.67 inch print at 300 DPI.
- Compare with your target. For a photo held in the hand, the usual target is 300 DPI. For a poster viewed from a few feet, 150 DPI is often enough. For a banner seen from metres away, 72 DPI can be fine. The target depends on viewing distance, not on the image.
Worked examples
Example 1: a camera photo as a hand-held print
A 6000 × 4000 px photo printed at 20 × 13.33 inches:
- Horizontal: 6000 / 20 = 300 DPI
- Vertical: 4000 / 13.33 = 300 DPI
This is a textbook 300 DPI print, suitable for close viewing.
Example 2: a Full HD image, two print sizes
A 1920 × 1080 px image printed 10 inches wide (10 × 5.63 inches):
- Horizontal: 1920 / 10 = 192 DPI
- Vertical: 1080 / 5.63 = 192 DPI
At 192 DPI this is fine for a poster, but soft for a close-up photo print. Printed 6.4 inches wide instead (6.4 × 3.6 inches), the same image gives 1920 / 6.4 = 300 DPI — now suitable for close viewing. Same pixels, different size, different result. Print size is the lever you control.
Example 3: a size given in centimetres
A 4000 × 3000 px image printed 30 cm wide:
- Convert: 30 / 2.54 = 11.81 inches
- Horizontal: 4000 / 11.81 = 339 DPI
- The height follows from the aspect ratio: 4000 × 3000 is 4:3, so the print height is 11.81 × (3/4) = 8.86 inches, and 3000 / 8.86 = 339 DPI.
Example 4: the reverse calculation
Suppose you want a 300 DPI print but have not chosen a size yet. Divide pixels by target DPI to get the largest size that holds 300 DPI:
- Maximum print width = pixel width / target DPI
- Maximum print height = pixel height / target DPI
A 3000 × 2000 px image at 300 DPI can print at most 10 × 6.67 inches. At 150 DPI, the same image can print at 20 × 13.33 inches. The DPI Calculator performs this reverse calculation automatically when you set a target DPI.
A quick reference table
| Image | Print width | Effective DPI | Good for |
|---|---|---|---|
| 3000 × 2000 px | 10 in | 300 | Hand-held photo |
| 3000 × 2000 px | 20 in | 150 | Poster |
| 1920 × 1080 px | 6.4 in | 300 | Hand-held photo |
| 1920 × 1080 px | 12.8 in | 150 | Poster |
| 6000 × 4000 px | 20 in | 300 | Hand-held photo |
| 6000 × 4000 px | 40 in | 150 | Large poster |
Common mistakes
- Using the DPI number stored in the file. That metadata may be missing, wrong, or set for a different print size. It is a suggestion, not a measurement. Always calculate from pixels and your intended size. See What Is DPI? for why.
- Forgetting the unit conversion. Dividing pixels by centimetres gives a meaningless number, not DPI. Convert to inches first: cm / 2.54, mm / 25.4.
- Checking only the width. If width and height give different DPI values, the image will be cropped or stretched. Check both, every time.
- Rounding too early. Keep full precision through the calculation and round only the displayed result. Rounding the print size from 6.67 to 7 inches before dividing changes the answer by about 5%.
- Assuming DPI describes quality. DPI tells you whether there are enough pixels for the size. A blurry original at 300 DPI still prints blurry.
Frequently asked questions
What if my image is 3000 × 2000 but I want an 8 × 10 inch print?
The aspect ratios do not match (3:2 vs 4:5), so width and height disagree: 3000 / 8 = 375 DPI, but 2000 / 10 = 200 DPI. You cannot fill an 8 × 10 frame with a 3:2 image at one DPI. Crop the image to 4:5 first (for example 2000 × 2500 px after cropping the width), then 2000 / 8 = 250 DPI and 2500 / 10 = 250 DPI. The Image Print Studio walks through exactly this check.
Does the same formula work for height?
Yes, and you should always run it. Effective DPI is a pair of numbers, not one, whenever the print shape differs from the image shape.
My image has no DPI metadata. Can I still calculate DPI?
Yes — metadata is irrelevant to the calculation. Pixels and intended print size are all you need.
How do I find my image’s pixel dimensions?
On most systems, right-click the file and choose Properties or Get Info. Or upload it to the DPI Calculator, which reads the dimensions in your browser without uploading the file to any server.
Try it: DPI Calculator · Print DPI Calculator · Pixels to Inches