DPI to PPI Converter Formula
Understand the math behind the dpi to ppi converter. Each variable explained with a worked example.
Formulas Used
Pixels Per Inch (PPI)
ppi = diagonal_inches > 0 ? diagonal_px / diagonal_inches : 0Pixel Size
pixel_size = diagonal_inches > 0 ? 25.4 / (diagonal_px / diagonal_inches) : 0Total Pixels
total_pixels = width_px * height_pxVariables
| Variable | Description | Default |
|---|---|---|
width_px | Screen Width(px) | 1920 |
height_px | Screen Height(px) | 1080 |
diagonal_inches | Diagonal Size(inches) | 24 |
diagonal_px | Derived value= sqrt(pow(width_px, 2) + pow(height_px, 2)) | calculated |
How It Works
Screen PPI Calculation
PPI = sqrt(W² + H²) / Diagonal Inches
Where W and H are the pixel dimensions.
Common Screen PPI
| Device | Approx PPI | |---|---| | 24" 1080p monitor | 92 | | 27" 4K monitor | 163 | | iPhone 15 | 460 | | iPad Pro | 264 |
Worked Example
1920x1080 display, 24-inch diagonal.
width_px = 1920height_px = 1080diagonal_inches = 24
- 01Diagonal pixels = sqrt(1920² + 1080²) = 2203
- 02PPI = 2203 / 24 = 91.8 PPI
- 03Pixel size = 25.4 / 91.8 = 0.277 mm
Ready to run the numbers?
Open DPI to PPI Converter