Germany managed to lose about 1.5 million people in one day after a new census Friday showed that officials had overestimated the country's population for years.

Most of them are likely to be foreigners who failed to declare their departure when leaving the country, one official said.

The new headcount put Germany's population at 80.2 million, down from just under 82 million. The census was the first comprehensive population count since 1987, when Germany was still divided into west and east.

The survey also showed a drop of about 14.9 percent, or 1.1 million, in foreigners living in Germany, according to the Federal Statistical Office, which presented the 2011 census results.

The discrepancy was especially wide in Germany's largest cities. At the census reference date — May 9, 2011 — Berlin had almost 180,000 fewer inhabitants than expected and Hamburg had some 80,000 fewer residents.

There were 15 million immigrants — both foreigners and German citizens with at least one parent who immigrated after 1955 — making up almost 19 percent of the population. Most came from Turkey, Poland and Russia and lived in cosmopolitan areas in western Germany. In eastern Germany the number of immigrants was below 5 percent.

The census also showed Germany has almost 34,000 registered same-sex partnerships, who had 5,700 children among them.

Women outnumbered men 41 million to 39 million. The disparity can be explained by women's longer life expectancy and the lingering effects of World War II, where millions of German men were killed.

Two-thirds in the census identified themselves as Christians. About 33 percent of east Germans and six percent of west Germans were not affiliated with any religion. More than 17 percent did not answer the question, which is why further research is needed to give the exact number of Muslims, Jews and other religious minorities, said Sabine Bechthold of the statistics office.