Android Pixel Calculator

SimpleAdvanced

dp

Density-independent Pixels

sp

Scale-independent Pixels

 


Check relation between the dp, px, sp, in, mm and pt measurement units and convert to other unit.

 in
@

Android doesn't do direct pixel mapping, it uses Density Independent Pixel (dpi) values to scales the actual screen size

to calculate pixel density - getResources().getDisplayMetrics().density;

px

Pixels

mm

Millimeters

pt

Points

in

Inches