How To Calculate A Display's Pixel Density (ppi / Pixels Per Inch) By Yourself And What Is Pixel Density

Updated on December 10, 2013

Definition

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.

Calculation

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

Figure 1. Calculating the pixel density knowing the resolution and size (diagonal) or a display
Figure 1. Calculating the pixel density knowing the resolution and size (diagonal) or a display

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)

Comments

    0 of 8192 characters used
    Post Comment

    • profile image

      onesmo jason 

      8 weeks ago

      i think its more helpfull article

    • profile image

      Sheraz Khalid 

      5 months ago

      Very nice and easy pice of information

    • profile image

      Reshu Vaish 

      5 months ago

      How we do in case we don't know the display size ?

    • profile image

      Sumit Singh 

      3 years ago

      Thanks a lot for taking the time out for explaining this. The article is extremely well written and lucidly explained. Great job.

    • profile image

      jon 

      3 years ago

      Why do the vertical and horizontal resolutions have to be squared and then the square root of that taken?

    • Distant Mind profile imageAUTHOR

      Distant Mind 

      4 years ago

      Thanks for pointing a possible mistake out. Where is the mistake though? Why do you think it's incorrect?

    • profile image

      shq 

      4 years ago

      PIXEL DENSITY = 2203 / 21.5

      this is incorrect.

    • Distant Mind profile imageAUTHOR

      Distant Mind 

      6 years ago

      Well, I guess being shocked is a good state to open up one's mind for learning, isn't it? :)

      Thank you for the nice comment teaches and I'm glad there was something new learned today.

    • teaches12345 profile image

      Dianna Mendez 

      6 years ago

      I hear my tech students talking about this on occasion. Now, I can talk to then with understanding.. won't they be shocked!

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, turbofuture.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://turbofuture.com/privacy-policy#gdpr

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)