DPI / PPI Calculator
Calculate a screen's pixel density (PPI) from its resolution and diagonal size — plus pixel pitch, aspect ratio, total megapixels, Android density bucket and a Retina check.
Input
Output
| Property | Value |
|---|---|
| No data yet | |
Guides
The DPI / PPI Calculator works out how densely packed the pixels are on any screen. Give it the resolution (width and height in pixels) and the physical diagonal size in inches, and it returns the pixel density in PPI (pixels per inch) along with the pixel pitch, aspect ratio, total megapixels, the Android density bucket and whether the display crosses Apple's Retina threshold.
Because "DPI" (dots per inch) and "PPI" (pixels per inch) are used interchangeably for screens, this one calculator answers both questions: how sharp a display is, and how large each pixel physically is.
How to use it
- Enter the horizontal Width in pixels (e.g. 3840).
- Enter the vertical Height in pixels (e.g. 2160).
- Enter the Diagonal size of the screen in inches (e.g. 27).
The results table fills in automatically as you type. Use Copy or Download to export the table as CSV.
Some common values to try: a 4K 27-inch monitor is 3840 x 2160 at 27"; a 1080p 24-inch monitor is 1920 x 1080 at 24"; an iPhone 15 Pro is 2556 x 1179 at 6.1"; a 14-inch MacBook Pro is 3024 x 1964 at 14.2".
How the numbers are calculated
- PPI = the diagonal resolution in pixels divided by the diagonal size in inches. The diagonal in pixels is the Pythagorean length of the width and height:
sqrt(width² + height²). - Pixel pitch =
25.4 / PPImm, the center-to-center distance between adjacent pixels (25.4 mm per inch). - Aspect ratio is the width-to-height ratio reduced by their greatest common divisor.
- Total pixels is width x height, also shown in megapixels.
- Density category maps the PPI onto Android's density buckets (ldpi, mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi).
- Retina is a yes/no check against a 220 PPI threshold — the density at which individual pixels become hard to distinguish at a typical viewing distance.
What is the difference between DPI and PPI?
Strictly, PPI (pixels per inch) describes screens, while DPI (dots per inch) describes printers. In everyday use they mean the same thing for a display: how many pixels fit into one linear inch. This tool reports PPI.
Why is my aspect ratio not a clean number like 16:9?
Phone and laptop panels often have odd native resolutions (for example 2556 x 1179), so the reduced ratio can be unusual (like 284:131). That is expected — it is the exact ratio, not a rounded marketing figure.
What counts as a Retina display?
There is no single official number, since Retina depends on viewing distance. This calculator uses 220 PPI as a practical cutoff for desktop-class screens; phones held closer typically need a much higher PPI to look equally sharp.
Privacy
Everything runs entirely in your browser. Your inputs are never uploaded, stored or logged — the calculation happens locally on your device.