Check out example codes for "pixel to inches". It will help you in understanding the concepts better.

Code Example 1

Assuming the pixel density is 96 dpi, there are 96 pixels per inch. 
Than 1 pixel = (1 / 96) inches.

Code Example 2

1000x1000 = 10.416666667

Learn ReactJs, React Native from akashmittal.com