How this calculator works
Pixels per inch (PPI) measures how densely a screen's pixels are packed — the higher the number, the sharper text and images look at a given viewing distance, because individual pixels become harder to distinguish. PPI depends on both the resolution (how many pixels) and the physical screen size (how spread out they are), so a lower-resolution phone screen can easily out-density a higher-resolution monitor.
This calculator uses the screen's horizontal and vertical pixel counts and its diagonal size in inches to compute PPI, the physical spacing between pixels (dot pitch), and the total resolution in megapixels.
The formulas
Diagonal resolution (pixels) = √(width² + height²)PPI = diagonal resolution (pixels) ÷ diagonal size (inches)Dot pitch (mm) = 25.4 ÷ PPIMegapixels = (width × height) ÷ 1,000,000The diagonal-pixels formula is the Pythagorean theorem applied to the pixel grid, treating width and height in pixels as the two legs of a right triangle.
Worked example: a 27-inch 4K UHD monitor
- Resolution is 3,840 × 2,160 pixels; diagonal size is 27 inches.
- Diagonal resolution = √(3,840² + 2,160²) = √19,411,200 ≈ 4,405.81 pixels.
- PPI = 4,405.81 ÷ 27 ≈ 163.18.
- Dot pitch = 25.4 ÷ 163.18 ≈ 0.156 mm between pixel centers, and total resolution is 3,840 × 2,160 ÷ 1,000,000 = 8.2944 megapixels.
Frequently asked questions
Is a higher PPI always better?
Up to a point. Past roughly 300 PPI at typical phone viewing distance, or roughly 100-110 PPI at typical desktop monitor distance, most people cannot distinguish individual pixels, so further increases matter less than color accuracy, brightness and contrast.
Why do phone screens have such high PPI compared to monitors?
PPI depends on how close the physical pixels are together, and phones are viewed from much closer than monitors or TVs. A phone needs a much higher PPI to look equally sharp at its shorter viewing distance.
What is the difference between PPI and DPI?
PPI (pixels per inch) describes a digital display. DPI (dots per inch) technically describes printer output, though the terms are frequently used interchangeably in casual conversation.
How do I find my screen's exact diagonal size?
It is normally printed in the product name or spec sheet (for example, 'a 27-inch monitor' means a 27-inch diagonal). Measuring the visible screen corner to corner with a tape measure also works.