San Francisco is a city surrounded on three sides by water. Well, maybe not so much surrounded as besieged. High tides already spill onto the sidewalks, and future sea level rise threatens roads, homes, and infrastructure. Duly noted. Last week the city released an action plan (really, a plan to make a plan) to protect its coastal assets and population against sea level rise.

San Francisco may be ahead of the curve in terms of action, but it is by no means the only place in danger. A rising tide may lift all boats, but it is hell for coastal civilization. A new study published today in the journal Nature Climate Change warns that future sea levels could displace far more people than previous studies have calculated.

Coastal inundation studies like this are basically the result of smashing two datasets together. The first half are coastal inundation maps, which basically show where higher seas seep into the existing topography. This is pretty straightforward: Turn up the faucet, and see the bays and peninsulas of the future. As long as you don’t try to predict exactly when sea levels will rise, these models are pretty noncontroversial (more on that later).

A three foot rise in sea level affects 4.2 million people, while a six foot rise would affect 13.1 million.

Population, on the other hand, is a lot harder to model. Which brings to mind an interesting bit of trivia about census data: One of the many ways to categorize people is by separating them according to A) Those who get really excited at the prospect of reading about census data; and, B) Those who have already clicked away.

Type As! Hang on to your petticoats, this rabbit hole goes deep. Census surveys collect population at multiple geographic scales. State, county, voting district, and so on. If you want to figure out population growth along the sliver of drown-able coastline, you need small chunks of census data. However, the most reliable tracks of census data are at the county level. “You are assuming that the topography is the same across the entire county,” says Mathew Hauer, applied demographer at the University of Georgia in Athens and co-author of the study. That is, the entire county is in the flood zone.

Smaller chunks of census data exist, “But the Census Bureau redraws boundaries every decade,” says Hauer. Imagine you want to know how much an area has grown or shrank in population over time, but every time you look the borders include more or less people. Expand that to include the entire US. This problem is so pervasive that geography has a special name for it: The Modifiable Areal Use Problem. Heck, it even has its own acronym: MAUP. Basically, MAUP makes it impossible to compare population data over time, because it does not let you tease out growth and decline in population apart from the shifting boundaries.

Hauer and his co-authors solved this problem by counting the number of houses in each block group. Then they built a statistical tool that let them extrapolate houses lost or gained over time. They did this using census data all the way back to 1940, which gave them the rate of population growth for these narrow tracts of seaside property. Assuming those population rates stayed similar, they then projected population growth along the coasts to the year 2100.

The results were pretty drastic. A three foot rise in sea level affects 4.2 million people, while a six foot rise would affect 13.1 million. This is several times higher than previous estimates. Example a study published in Global Environmental Change in 2013 put 1.8 to 7.4 million people at risk from rising seas.

Which is worrying, until you stop and consider San Francisco. If the city’s action plan for sea level rise works perfectly, higher tides will not force anyone to move (higher rent, on the other hand…). Same for other places preparing for coastal inundation. Heck, ocean front real estate could take a hit from studies like this—sea level rise cannot displace people who never moved to the coast in the first place. These are like butterfly effects, impossible to account for in a long term population model. “If you looked from the 1930s or 40s and tried to get population growth all the way to 1980, you could probably get some idea if you had Nostradamus do some work for you,” says Michael Kearney, an oceanographer at the University of Maryland who co-authored the 2013 population estimate. “But a lot of this is predicated on things we can’t know about.” He ticks off events like the Great Depression, World War II, and the Baby Boom, saying there’s no way of knowing what other kinds of events could shift demographic trends between now and 2100. Kearney says he no longer participates in long term risk forecasts.

Hauer concedes that his research bridges over uncertainty using a lot of assumptions. “We don’t know what public policies might be coming down, sea walls and so on,” he says. “We also tried to look at feedback loops between sea level rise and population.” Will people still stay in, or move to, places becoming inundated by sea level rise?

And that isn’t even accounting for the problems with predicting sea level rise. Don’t get it twisted: the waters they are a-rising. But the rate is anything but predictable. For example, a pair of recent studies showed that sea level rise has been accelerating at previously unforeseen rates. Even if that research were included in the NOAA sea level rise data used in this study (which is was not), it would not be enough to print out beach brochures for 2100.

Which is not to say this research is useless. “As a planning tool, it is good to get an idea of what could happen, even if it doesn’t show exactly what will happen,” says Kearney. But he said research like this could be more useful to planners if it focused more on the near term. “With the trends we have now and technology growing like it is, we might be able to have some certainty about what is going to happen in the 2030s.” The best time to build a sea wall was twenty years ago. The second best time is right now.