The scale factors, and why they are ratios
Every bucket is defined relative to mdpi, which is the baseline at 160 dpi and 1×. The rest follow by dividing by 160: hdpi is 240/160 = 1.5×, xhdpi is 2×, xxhdpi is 3× and xxxhdpi is 4×. That is the whole conversion table. A 24 px mdpi asset becomes 36 px on hdpi, 48 on xhdpi, 72 on xxhdpi and 96 on xxxhdpi — multiply the mdpi number by the target scale and you are done.
ldpi is the one awkward entry: at 120 dpi the scale is 0.75, so assets shrink rather than grow. In practice nothing ships ldpi bitmaps any more, because the platform has not supported a 120 dpi device in years and the resource system will happily downscale mdpi for anything that asks for it. If you are exporting by hand, ldpi is the folder you can safely leave out.
Rounding that ruins your assets
The scale factors are not all integers, so converting upward and back down does not always return the number you started with. Going mdpi → hdpi halves into thirds: a 25 px asset becomes 37.5 px and the build system rounds it. Coming back, 38 px hdpi is 25.33 dp, which rounds to 25 again — harmless. Do that twice with odd sizes and you drift. Always export from the largest source you have and scale down, never up, for anything where a one pixel difference is visible.
Adaptive icons change the numbers
The 48 dp launcher icon table above is the legacy shape. Adaptive icons introduced in Android 8 use a 108 dp canvas with only the central 72 dp guaranteed to be visible, because launchers crop and animate the edges for their own mask. That means the foreground layer is exported at 108 dp (162 px at xxhdpi, 432 px at xxxhdpi), not at the 48 dp figure, and the artwork must survive the crop. If you are shipping adaptive icons, size the foreground from 108 dp and keep important detail inside the inner two thirds.
Densities that are not buckets
Most modern Android phones do not report one of the six bucket values. A Pixel 5 reports 440 dpi; a Galaxy A54 reports 450; many ROMs with a display-size slider report values like 411 or 434. None of these are buckets, and none of them get their own drawable folder. The system picks the nearest bucket for resource selection while using the exact value for px-to-dp math — which is why a 440 dpi phone still reads drawable-xxhdpi but lays out in slightly fewer dp than a 480 dpi phone of the same resolution.
If you are checking your own device, adb shell wm density prints the reported value and adb shell wm density reset restores the manufacturer default. Our dp ↔ px converter takes any density, not just the six buckets, and our density bucket guide explains how the lookup is performed.