The gmina covers an area of 161 sqkm , and as of 2006 its total population is 20,504 (out of which the population of Ryki amounts to 9,716, and the population of the rural part of the gmina is 10,788).