Karlshamn is a municipality in southern Sweden, in the county of Blekinge. The municipality covers an area of 491.2 km². Of the total population of 30741, 15350 are male, and 15391 are female. The population density of the community is 63 inhabitants per km².