Works on this device
Screen Pixel Density Calculator
Pixel density says how closely the pixels of a screen are packed. Find it from a pixel count and a measured length, change it between inches and centimetres, or see what the device pixel ratio does.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose the button below them.
Your result
How it was worked out
How to use this calculator
- Choose Pixel density from a pixel count and a measured length.
- Enter how many pixels lie along one side of the screen, for example 1920 for the width of a Full HD screen.
- Measure that side of the lit screen with a ruler. Enter the length and choose inches, centimetres or millimetres.
- Choose Calculate. The result shows pixels per inch, per centimetre and per millimetre.
- If you know the diagonal and not the side, use the Display PPI Calculator. Then convert its answer here if you need centimetres.
The formulas
- Pixel density = pixels along a side ÷ length of that side.
- Pixels per centimetre = pixels per inch ÷ 2.54. Pixels per millimetre = pixels per inch ÷ 25.4. One inch is exactly 2.54 cm.
- Pixels in one square inch = pixels per inch × pixels per inch, for square pixels.
- CSS pixels per inch = pixels per inch of the screen ÷ device pixel ratio.
Worked example
A Full HD monitor has 1920 pixels across, and the lit part is 53.13 cm wide. That is 53.13 ÷ 2.54 = 20.9173 inches. Pixels per inch = 1920 ÷ 20.9173 = 91.79. Pixels per centimetre = 91.79 ÷ 2.54 = 36.14, and pixels per millimetre = 3.614.
110 pixels per inch is 110 ÷ 2.54 = 43.31 pixels per centimetre. One square inch holds 110 × 110 = 12,100 pixels, and one square centimetre holds 1,875.50.
A phone screen has 460 pixels per inch and a device pixel ratio of 3. It shows 460 ÷ 3 = 153.33 CSS pixels per inch. One CSS pixel is 0.1657 mm wide and covers 9 screen pixels. A length of one "CSS inch" (96 CSS pixels) is only 0.626 real inches on this screen.
PPI and DPI
PPI means pixels per inch. It counts the pixels of a screen along one inch.
DPI means dots per inch. It comes from printing: a printer puts small dots of ink on paper, and it may need many dots to make one pixel of a picture. So a printer with 1200 dots per inch does not print 1200 pixels per inch.
For screens, people often say DPI and mean PPI. A mouse also has a "DPI" value, which is a different thing: how far the pointer moves when you move the mouse one inch.
Device pixel ratio and CSS pixels
Web pages are measured in CSS pixels. On a screen with many pixels per inch, one CSS pixel is drawn with more than one screen pixel, so that text keeps a readable size. The device pixel ratio says how many screen pixels lie along one CSS pixel.
The option Device pixel ratio that your browser reports shows this number as reported by your browser. It changes with the scaling setting of the operating system and with the zoom of the browser. The number stays on this page. It is not stored and not sent.
Android density groups
Android sorts screens into density groups. An app gives sizes in dp (density-independent pixels), and Android turns them into screen pixels: pixels = dp × density ÷ 160. This list is from the Android developer documentation. The maker of a device chooses its group, so a screen is not always in the group nearest to its real pixels per inch.
| Name | Dots per inch | Screen pixels for 1 dp |
|---|---|---|
| ldpi | 120 | 0.75 |
| mdpi | 160 | 1 |
| hdpi | 240 | 1.5 |
| xhdpi | 320 | 2 |
| xxhdpi | 480 | 3 |
| xxxhdpi | 640 | 4 |
Limits you should know
- The result is only as good as your measurement. Measure the lit part of the screen, not the frame.
- The two area values take square pixels: the same density across and down. Almost all computer and phone screens have square pixels.
- Pixels per millimetre are rounded to 3 decimal places and the other results to 2 decimal places.
- The page cannot measure your screen. It cannot read the real pixels per inch of the panel from the browser. It can only show the device pixel ratio that the browser reports.
- This page does not test a screen for dead pixels. Use the Dead Pixel Test for that.
- For the distance between pixels, use the Pixel Pitch Calculator.