How To Calculate A Display's Pixel Density (ppi / Pixels Per Inch) By Yourself And What Is Pixel Density
Pixel density is a metric telling us how many pixels there are in a fixed area of a display. It's a very important metric because it lets us know how closely packed the pixels on a display are. This is something that determines the quality, clarity, and readability of the image displayed. It is usually measured in a unit called pixels per inch (ppi).
Very often, when we are confronted with evaluating the quality of a display and/or comparing two or more displays together, we don't have all the information available. Something that is often missing is the pixel density, which is actually a very important metric and can provide us with valuable information about the picture quality we could expect. But we almost always know the size (diagonal) of the screen given in inches and the resolution. Having this information we could easily calculate the pixel density ourselves.
If we have two displays with the same resolution, the smaller one will have the higher pixel density. And if we have displays with the same size, the one with a higher resolution will have the higher pixel density. So it's clear that the two parameters that we need in order to calculate the pixel density are display size and resolution.
Pixel Density Formula
Using the right units
You need to make sure you are using the right units in order to get the right result in the expected unit. If there are units that don't fit, they need to be converted.
Resolution - number of pixels (usually not specially denoted)
Display Size (diagonal) - inches
Pixel Density - pixels per inch
First you need to calculate the diagonal resolution and then divide it by the size (diagonal in inches) of the display. The diagonal resolution is the square root of the sum of the squares of the squares of the two multiples of the resolution (width and length). In order to make it sound and look easier to understand we can put this all together into a single formula that you can see on Figure 1.
If you don't have information about the diagonal of the screen, you an always calculate it using the Pythagorean Theorem using its length and the width. The diagonal is the square root of the sum of the squares of the length and the width. Diagonal = square root of (width2 + length2).
Example 1 (textual)
Let's say we have a smartphone with a 4.5 inch display and a resolution of 768x1280. It means that we have all the parameters we need to do the calculation: width=768; length=1280 and display size=4.5 inch. First we are going to determine the the diagonal resolution by calculating the square root of 7682 + 12802. 7682 + 12802 = 589824 + 1638400 = 2228224 and the square root of that is about 1492.7. This is a the diagonal resolution which we now divide by the diagonal 4.5 inches and get the answer of roughly 332ppi, which is a really outstanding result for a smartphone.
Example 2 (mathematical)
Let's say we have a computer display that is 21.5 inch with a 1920×1080 resolution.
display size = 21.5inch
width = 1920
length = 1080
diagonal resolution = square root of (19202 + 10802)
diagonal resolution = square root of (3686400 + 1166400)
diagonal resolution = square root of 4852800
diagonal resolution = 2203 (close approximation)
pixel density = diagonal resolution / display size
pixel density = 2203 / 21.5
pixel density = 103ppi (close approximation)
This article is accurate and true to the best of the author’s knowledge. Content is for informational or entertainment purposes only and does not substitute for personal counsel or professional advice in business, financial, legal, or technical matters.