# PPI calculation

Have the screen resolution (width and height) in pixels and the diagonal length in inches, and want to calculate the PPI? Pretty simple really. Let’s use a concrete example. The iPad 4 has a screen resolution of 2048 by 1536 pixels, and a diagonal length of 9.7 inches. Thus we calculate its PPI as

The calculation above was performed using the wonderful MyScript Calculator, and the result captured by taking a screenshot.

Here’s the same formula using WordPress’ $\LaTeX$ renderer, in a more generalized form: $\sqrt{w^2 + h^2} \over L$, where $w$ is the screen width in pixels, $h$ is the screen height in pixels, and $L$ is the diagonal length of the screen in inches.