Understanding the pixel density (PPI) calculator — concept and principle
This calculator finds the pixel density of a screen in pixels per inch (PPI), the dot pitch (the distance between neighbouring pixels) and the viewing distance at which individual pixels become hard to see. Use it to compare monitors, laptops, phones and TVs whose resolutions and sizes differ.
How it is calculated
PPI = √(w² + h²) ÷ d
- w and h are the horizontal and vertical resolution in pixels; √(w² + h²) is the number of pixels along the diagonal.
- d is the screen diagonal in inches, as advertised.
Dot pitch (mm) = 25.4 ÷ PPI, because 1 inch = 25.4 mm.
"Retina" distance = 1 ÷ (PPI × tan(1 arcminute)) inches, converted to cm by × 2.54.
The principle
Screen sizes are sold by the diagonal, so the diagonal pixel count is divided by the diagonal length. By Pythagoras' theorem, the diagonal of a w × h grid of square pixels has √(w² + h²) pixels. The "Retina" distance uses a common rule of thumb: normal (20/20) visual acuity resolves detail of about 1 arcminute (1/60 of a degree). Beyond the distance where one pixel covers less than 1 arcminute, the eye can no longer separate pixels.
Worked example
Default inputs: 2560 × 1440 pixels on a 27-inch screen.
- Diagonal pixels = √(2560² + 1440²) = √8,627,200 ≈ 2,937.2.
- PPI = 2,937.2 ÷ 27 ≈ 108.8 PPI.
- Dot pitch = 25.4 ÷ 108.79 ≈ 0.233 mm.
- Total pixels = 2560 × 1440 = 3,686,400.
- "Retina" distance = 1 ÷ (108.79 × 0.00029089) ≈ 31.6 in ≈ 80 cm.
How to read the result
Desktop monitors of about 90–110 PPI look sharp at normal desk distance with no scaling; around 140–220 PPI text looks very smooth but you will usually use display scaling. Phones are held close, so they need much higher densities. If you sit farther away than the "Retina" distance, more PPI brings little visible benefit; a 27-inch 4K monitor (163.2 PPI) reaches it at about 53 cm.
Common mistakes
- Comparing PPI without considering viewing distance; a TV with low PPI can look sharper than a laptop from the sofa.
- Using the screen's width instead of its diagonal.
- Confusing PPI (pixels on a screen) with DPI (printer dots or mouse sensitivity).
- Forgetting that ultrawide or non-standard aspect ratios change the diagonal pixel count.
Frequently asked questions
What is the PPI of a 27-inch 1440p monitor?
About 108.8 PPI.
What is the PPI of a 27-inch 4K monitor?
About 163.2 PPI.
Is higher PPI always better?
Only up to the point your eyes can resolve at your viewing distance. Beyond that, it mainly costs more and needs more graphics power.
Why is the diagonal not exactly the advertised size?
Advertised sizes are rounded and may include a small area hidden by the bezel, so PPI can differ slightly from the true value.
Sources: H. Snellen, Probebuchstaben zur Bestimmung der Sehschärfe (1862) · Euclid's Elements, Book I, Proposition 47 (Pythagorean theorem)