How the PPI calculator works
Pixels per inch compares the number of pixels on the screen to the physical length of the screen. The calculation needs three numbers: the pixel width, the pixel height and the diagonal in inches. The diagonal is the distance from one corner of the visible area to the opposite corner, not including the bezel.
The formula
The pixel diagonal comes from Pythagoras: √(width² + height²). Divide that by the diagonal in inches and you have PPI. In one line: PPI = √(w² + h²) ÷ diagonal. Dot pitch is 25.4 ÷ PPI, which gives millimetres because there are 25.4 mm in an inch.
A worked example
A 1920 × 1080 screen has a pixel diagonal of about 2202.9 pixels. On a 24-inch monitor that is 2202.9 ÷ 24 = 91.8 PPI. The dot pitch is 25.4 ÷ 91.8 = 0.277 mm. The same panel is 20.92 × 11.77 inches, or about 53.1 × 29.9 cm, because each side in pixels is divided by the same PPI.
Dot pitch is the gap between pixels
Dot pitch is measured from the centre of one pixel to the centre of the next. A smaller number means the pixels sit closer together. It is another way of stating density: 91.8 PPI and 0.277 mm describe the same panel, just in different units.
Physical size and aspect ratio
The width and height in inches are each side divided by PPI. They add up to the diagonal you entered, which is a quick way to check the numbers. The shape of the screen is a separate question: a 1920 × 1080 panel and a 3840 × 2160 panel are both 16:9, but the second has four times as many pixels. The aspect ratio calculator simplifies the shape if that is what you need.
PPI, DPI and CSS pixels
PPI describes a display. DPI usually describes printer dots or a scaling setting in an operating system, and mouse DPI is a sensitivity figure, so the three are not interchangeable. Browsers also report CSS pixels rather than device pixels: a phone may have 1170 × 2532 real pixels but report about 390 × 844 CSS pixels with a device pixel ratio of 3. If you enter the reported numbers without multiplying, the PPI you get is the logical density, not the panel's real density. Screen Info shows what your browser reports, including the pixel ratio.
What PPI does not tell you
PPI says nothing about colour, contrast, brightness or response time, and nothing about how sharp the screen looks from where you sit. Viewing distance matters: the same panel can look crisp at a desk and soft from across a room. Higher PPI also means the operating system has to scale text and interface elements, which can make some apps look small or blurry if scaling is set poorly.