You have an image and a print size in mind, and every tool asks about "resolution" in a different unit. The two terms are easy to separate. PPI (pixels per inch) describes how many pixels of an image or screen fit in one inch. DPI (dots per inch) describes how many ink dots a printer places in one inch. PPI belongs to the picture, and DPI belongs to the printer.

This guide gives both definitions, the formulas that connect pixels to inches, and worked examples for print and screen. It also shows why the density number stored in a file does not change the number of pixels or the file size.

Two definitions, two different things

The federal digitization guide measures the spatial resolution of an image in pixels per inch, abbreviated PPI, and adds that pixels per millimeter or per centimeter are also used. It notes that resolution is often called dots per inch, or DPI, and that in common usage the two terms are used interchangeably.

The guide then draws the line that matters. Since raster image files are made of pixels, PPI is technically the more accurate term for them. DPI is the appropriate term for printer resolution, because a printer produces actual dots and not pixels. DPI was originally a printing term: how many dots of ink are placed on a print in one inch.

PPI DPI
Full name Pixels per inch Dots per inch
What it counts Pixels of a digital image, scanner or screen Dots of ink or toner from a printer
Belongs to The image or display The printing device
Tells you How densely the pixels are spread over a physical length How finely the printer can place dots

Web standards use the same unit name: the CSS specification defines dpi as dots per inch, and states that 1 inch equals 2.54 cm and 96 CSS pixels.

Pixel count and print length are tied by one relationship:

PPI = pixels ÷ inches, which can be rearranged as pixels = inches × PPI

The federal guide gives a simple case: an 8 × 10 inch photograph scanned at 100 ppi produces an image of 800 by 1,000 pixels, or 800,000 pixels in total.

Worked example. Example: an image of 3000 × 2000 pixels, which is 6,000,000 pixels or 6 MP.

Print it at different widths. The density is 3,000 ÷ width in inches, and the height in inches is 2,000 ÷ density.

Print width Density Print height
4 in 3,000 ÷ 4 = 750 ppi 2,000 ÷ 750 = 2.67 in
6 in 3,000 ÷ 6 = 500 ppi 2,000 ÷ 500 = 4.00 in
10 in 3,000 ÷ 10 = 300 ppi 2,000 ÷ 300 = 6.67 in
20 in 3,000 ÷ 20 = 150 ppi 2,000 ÷ 150 = 13.33 in

The pixels never change. Stretching the same pixels over a longer print lowers the density.

Run it the other way when you start from a print size. Example: a 6 × 4 inch print at 300 ppi, a value chosen for the exercise, needs 6 × 300 = 1,800 by 4 × 300 = 1,200 pixels, which is 2,160,000 pixels or 2.16 MP. The image file size calculator turns pixel dimensions into megapixels and uncompressed bytes, and what is a megapixel explains the unit.

The same math on a screen

A display has a pixel density too. Divide the diagonal measured in pixels by the diagonal in inches.

Example: a 1920 × 1080 screen with a 24-inch diagonal. The diagonal in pixels is √(1,920² + 1,080²) = 2,202.9, so the density is 2,202.9 ÷ 24 = 91.8 ppi. On a 27-inch screen of 2560 × 1440, the same steps give 2,937.2 ÷ 27 = 108.8 ppi.

CSS pixels are a separate idea. The CSS specification defines the reference pixel as the visual angle of one pixel on a device with a density of 96 dpi, and it states that 1 dppx is equivalent to 96 dpi. That is a rule for CSS lengths, separate from the density of any particular screen. How to size pictures for a page is covered in choosing image dimensions for the web.

What the number inside the file does

An image file can carry a density value, but the pixel grid is what it stores. The PNG specification shows how little the value does. Its optional physical-size chunk holds pixels per unit for the horizontal and vertical axes, and the unit is either the metre or unknown. With an unknown unit it defines only the pixel aspect ratio, and the physical size of the pixels remains unspecified. If the chunk is absent, pixels are assumed to be square, with no stated physical size.

Because the unit is the metre, 300 ppi converts to 300 ÷ 0.0254 = 11,811 pixels per metre, since one inch is 0.0254 m.

Changing that value changes nothing in the data. The uncompressed size is bytes = width × height × bits per pixel ÷ 8, and density is not part of the formula. Example: 3,000 × 2,000 × 24 ÷ 8 = 18,000,000 bytes, whether the file says 72 or 300.

Matching the picture to the print shape

Pixels per inch assumes the shape fits. Example: the 3000 × 2000 image above is 3:2, so a 6 × 4 inch print fits exactly. A 10 × 8 inch landscape print is 5:4, and the image must be cropped.

Keep the full height of 2,000 pixels. The width for 5:4 is 2,000 × 5 ÷ 4 = 2,500 pixels, so 500 pixels are cropped. The density is then 2,500 ÷ 10 = 250 ppi, and 2,000 ÷ 8 = 250 ppi vertically. The aspect ratio calculator finds the crop width, and aspect ratios explained covers the method.

Common mistakes

  • Using DPI and PPI as if they were one measure. A printer's dot density does not tell you how many image pixels you need. Compute the pixels from the print size and the density you choose.
  • Believing a fixed number such as 300 is always required. The federal guide says to pick a resolution suited to the physical item and the level of detail you want. The 300 in this guide's examples is only an example.
  • Changing the density tag and expecting a different file. The pixel count and the uncompressed size stay the same.
  • Upscaling to reach a target density. Resizing to more pixels raises the number but adds no information. The guide notes that more pixels generally record more fine detail, but not always.
  • Ignoring the shape of the print. If the aspect ratio differs, part of the picture is cropped or the density drops along one side.

FAQ

What is the difference between PPI and DPI?

PPI counts pixels per inch in an image or on a screen. DPI counts the ink dots per inch that a printer places. People often use the terms interchangeably, but they describe different devices.

How do I calculate PPI?

Divide the pixel count along one side by the length of that side in inches. A 3,000-pixel width printed 10 inches wide gives 300 ppi.

Does changing the PPI change the file size?

No. The size depends on width, height and bits per pixel. The density value is only a note about intended physical size.

How many pixels do I need for a given print?

Multiply each side in inches by the density you want. Choose the density by the detail you need, then check the result against your image.

Sources

  1. Federal Agencies Digital Guidelines Initiative (FADGI), Technical Guidelines for Digitizing Cultural Heritage Materials: Third Edition. Accessed November 6, 2026.
  2. W3C, CSS Values and Units Module Level 4. Accessed November 6, 2026.
  3. W3C, Portable Network Graphics (PNG) Specification (Third Edition). Accessed November 6, 2026.