Droid10

PPI vs DPI on Android: which number matters for layout?

PPI and DPI look interchangeable, but on Android they answer different questions. PPI describes the panel hardware; DPI is the density the system reports and the one layout math must use. Mixing them up gives the wrong dp width — and the wrong px size for every element on screen.

PPI: physical pixels per inch

PPI is a property of the glass: how many physical pixels fit in one inch of the panel. It is computed from the resolution and the diagonal screen size, and nothing else:

ppi = √(widthPx² + heightPx²) / diagonal inches

A higher ppi means a sharper panel, but it says nothing by itself about how Android scales a layout. Two phones with the same ppi can report different densities, and one phone's ppi can stay fixed while its reported density is overridden.

DPI: the density Android reports

DPI, in Android terms, is the density the system uses to convert dp into px: px = dp × (dpi / 160). It is the manufacturer's chosen value for the device, and it is frequently not the nearest density bucket to the physical ppi. That is deliberate: the shipped density is tuned so text and touch targets feel right on that particular panel size.

This is why the find-your-DPI guide reads the reported value with adb shell wm density instead of computing ppi: only the reported value reproduces what the layout engine actually does.

Worked example: Pixel 9

The Pixel 9 panel is 1080×2424 px on a 6.3-inch diagonal, so its physical ppi is √(1080² + 2424²) / 6.3 ≈ 421 ppi. But the phone reports 480 dpi. Its layout width is therefore 1080 / (480 / 160) = 360 dp. If you converted with ppi instead, you would get about 410 dp — a layout 50 dp too wide, and every px size derived from it wrong.

DeviceResolutionPhysical ppiReported dpiLayout width
Pixel 91080×2424421 ppi480 dpi360 dp
Pixel 51080×2340430 ppi440 dpi393 dp
Galaxy A34 5G1080×2340390 ppi420 dpi411 dp
Galaxy S101440×3040551 ppi480 dpi480 dp

PPI and reported dpi in this table are computed from the same device data used by the device pages — no new panel specifications are introduced here. Every example above ships with the stated reported density; devices without a shipped value are not used in this table.

Which one to use, when

Use ppi when you are comparing panel sharpness — for example, when deciding whether a higher-resolution screen will actually look crisper. Use reported dpi for everything layout-related: dp to px conversion, smallest-width calculations, and density-bucket decisions. The DPI calculator and dp to px converter both work from the reported density, which is why their results match what you see on the device.

The one-line rule: ppi describes the screen, dpi drives the layout. If a number came from a spec sheet's resolution and screen size, it is ppi. If it came from wm density or a device page's reported density, it is dpi — and that is the number to convert with.

dp to px conversion →Find your phone's DPI →Density buckets →Screen resolutions list →