A German official said Tuesday the country can sustain up to 500,000 or more new asylum-seekers every year, a comment that comes as hundreds of thousands of people from war-torn countries across the Middle East and Africa are making their way to Europe to chase the promise of a better life.

But what’s the economic effect of so many migrants streaming into Germany? The country expects to receive 800,000 refugees and migrants by the end of 2015. That could cost as much as 10 billion euros, according to local government estimates. Next year, German officials estimate that as many as 460,000 more people could be entitled to social benefits.

Some anti-immigration groups argue foreigners are a drain on a country’s economy, as they seek to avail themselves of government services before contributing to the state themselves. But Germany has a long history of outsiders representing a net positive for the country’s economy. The 6.6 million people living in Germany with foreign passports paid $4,127 more in taxes and social security on average than they took in social benefits in 2012–generating a surplus of 22 billion euros that year, according to one report. German officials are hopeful that, in the long run, this summer’s new flood of refugees could result in a similar economic gain.

“We will profit from this, too, because we need immigration,” German Labor Minister Andrea Nahles said. “The people who come to us as refugees should be welcomed as neighbors and colleagues.”

Part of Germany’s rationale for allowing hundreds of thousands of migrants through the doors lies in demographics. Germany has one of the world’s most rapidly aging and shrinking populations. With one of the world’s lowest birthrates, the country relies on immigration to plug a growing workforce hole. According to one expert quoted in Deutsche Welle last year, the German economy needs to attract 1.5 million skilled migrants to stabilize the state pension system as more Germans retire. An influx of young migrants could improve the country’s dependency ratio, a measure of those over 65 compared to those of general working age between 15 and 64. According to current official estimates, every third German could be over 65 by 2060, leaving two workers to support each retiree.

Still, the jury is still hung on whether immigrants overall serve as drains or boosts to economies. According to one 2011 working paper from Harvard Business School, immigrants in Northern Europe have traditionally started off as a drain on state resources, though some of their wages tend to increase over time, allowing them to contribute back to the state.

Ultimately, whether or not this new wave of migrants helps or hinders Germany’s economy depends heavily on the skillsets they bring. Many of Germany’s current working foreigners — the ones that created the surplus mentioned above — are high-skilled workers from other European countries like Greece. In contrast, the migrants flooding into Germany right now may not be as well-trained. Though the research on the subject is thin, one estimate pegs more than half of refugees lack professional training. That means German policymakers will have to do a very good job of taking unskilled workers and incorporating them into the German labor force in a way that makes sense for long-term growth, whether that’s by incentivizing them to take low-skilled jobs or training them to do higher-level work.