Section 01 · Pixel Pitch Math
What is the difference between physical PPI and CSS pixels?
Physical Pixels Per Inch (PPI) is a fixed hardware property determined by a display panel’s native pixel resolution and diagonal size in inches, calculated as Physical PPI = √(W² + H²) / diagonalInches. By contrast, a CSS pixel is an abstract angular unit defined by the W3C CSS Values and Units Module Level 4 specification at exactly 1/96 of a CSS inch (3.7795 CSS pixels per millimeter). When an operating system applies HiDPI scaling—such as devicePixelRatio = 2 on Retina Macs or 1.25 to 1.5 on Windows laptops—each CSS pixel spans multiple physical subpixels. Online Ruler Plus calibrates in CSS pixels per millimeter (pxPerMm) and stores physical density (devicePxPerMm = pxPerMm × dpr) so your ruler stays consistent across browser zoom changes.