How is population density calculated? Where does India stand

How is population density calculated? Where does India stand as compared to other countries with respect to population density?

The population density is calculated as the number of persons per unit of area.
India’s stand in population density with respect to other countries is discussed below
India is one of the most densely populated countries in the world. As per census report 2011, the population density of India was 382 person per sq. km.
Due to variation in climatic condition, economic - ’ opportunities and other geographic factors India has very uneven distribution of population ranging from 1102 person/sq. km in Bihar to only 17 person/sq. km in Arunachal Pradesh.
India is the 3rd most dense country in the world after Bangladesh and Japan.