Rocklin is a city in Placer County, California, located approximately 22 miles from Sacramento, California, and about 6.1 miles northeast of Roseville in the Sacramento metropolitan area. Besides Roseville, it shares borders with Granite Bay, Loomis and Lincoln.