How it’s calculated
Pixel density is how many pixels fit along one inch of the screen. The screen diagonal in pixels follows from the Pythagorean theorem, and dividing by the diagonal length in inches gives pixels per inch (PPI).
Example: a 3840 × 2160 monitor with a 27 inch diagonal. √(3840² + 2160²) = 4,405.8 pixels, so PPI = 4,405.8 ÷ 27 = 163.18 PPI. Dot pitch = 25.4 ÷ 163.18 = 0.1557 mm. The screen is 27 × 3840 ÷ 4,405.8 = 23.53 in wide and 27 × 2160 ÷ 4,405.8 = 13.24 in tall.
This assumes square pixels and that the diagonal is the visible screen area. Manufacturers round their sizes, so published PPI values can differ by a percent or so. PPI describes a screen; "DPI" for printers counts ink dots and is a different thing. A CSS pixel in a web page is also not a device pixel: CSS defines 1 inch as 96 CSS pixels.
Frequently asked questions
How do I calculate PPI?
Take the square root of width squared plus height squared (the diagonal in pixels) and divide it by the screen diagonal in inches. A 1920 × 1080 screen of 24 inches is 2,202.9 ÷ 24 = 91.79 PPI.
What is a good PPI?
There is no single answer: it depends on how far you sit. The closer the screen, the more PPI you need before pixels stop being visible, which is why phones held close have far higher PPI than TVs. Compare similar devices rather than chasing a number.
What is the difference between PPI and DPI?
PPI counts pixels on a screen or image per inch. DPI counts printed ink dots per inch. People often use DPI loosely to mean PPI, but a printer can lay down many dots to make one pixel of an image.
What is dot pitch?
Dot pitch (or pixel pitch) is the spacing between neighboring pixels, in millimeters. It is 25.4 mm divided by the PPI, so a smaller dot pitch means a sharper screen.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- College Algebra 2e, §2.1 The Rectangular Coordinate Systems and Graphs (Pythagorean theorem and the distance formula) — OpenStax
- CSS Values and Units Module Level 4: absolute length units (1in = 96px) — W3C
- NIST Guide to the SI, Appendix B.8: the inch is exactly 2.54 centimeters — U.S. National Institute of Standards and Technology
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator