Gagnef is a municipality in central Sweden, in the county of Dalarna. The municipality covers an area of 771.6 km². Of the total population of 10075, 5098 are male, and 4977 are female. The population density of the community is 13 inhabitants per km².