Calculating pixels per inch
Use the Pythagorean theorem to find diagonal pixel count: the square root of horizontal pixels squared plus vertical pixels squared. Divide that value by the physical diagonal in inches to obtain pixels per inch.
Pixel pitch
Pixel pitch is the approximate distance from one pixel center to the next. Dividing 25.4 millimeters per inch by PPI gives a pitch in millimeters when pixels are square and evenly spaced.
What PPI does not describe
Perceived sharpness also depends on viewing distance, eyesight, scaling, subpixel layout, panel technology, content, and rendering. Advertised diagonal size may not equal the exact active image area.
The result assumes the entered resolution maps one-to-one to a rectangular active area with square pixels. It does not measure print DPI, device scaling, or image quality.