Rocklin is a city in Placer County, California, United States, about 22 miles from Sacramento, and about 6.1 miles northeast of Roseville in the Sacramento metropolitan area. Besides Roseville, it shares borders with Granite Bay, Loomis and Lincoln. As of the 2020 census, Rocklin's population was 71,601.