It’s hard to find anyone optimistic about the future of conventional retail as internet giants like Amazon continue to accumulate customers. But where’s the bottom? There is a helpful parallel—just not an obvious one—that might shed some light on the question.

The best way to measure retail’s role in the economy while simultaneously accounting for population change is retail space per capita. It may be a blunt instrument, but it’s one that’s been consistently documented back into the 1800s.

It’s the kind of thread that historians like me can’t help but pull with both hands. For example, the Appraisal Journal, a publication dedicated to tax assessment, observed the following in 1939: “Traditionally, we have considered the level of retail saturation to be about 2.5 square feet of gross retail space per capita.”

That was during the Great Depression, hardly a time of booming consumer spending. But the reference to tradition suggests the figure reflected some kind of longstanding wisdom about what the market could bear. Remarkably, that rule-of-thumb statistic from nearly 80 years ago is rather close to the current figure for all of Europe in 2017: 2.856 square feet per capita.

Still, we all know Americans really love to shop, right? And the postwar era was the era of rising consumption. By 1960, there were 4 square feet of retail space per capita in the U.S. Thanks to the growth of the suburbs, never mind growing purchasing power, it kept rising. By 1964, it was at 5.4 square feet. Ten years later, it crested 9 square feet per capita, and by 1988, it stood at 16 square feet.

Rising anxiety about the size of the retail sector did nothing to slow the trend. By 1996, two years after Jeff Bezos started Amazon in his garage, there were 19 square feet of gross retail space per capita. It continued to rise, but more slowly, eventually leveling off at 23.5 per capita as of last year.

Decline looks inescapable, but conventional retail stores won’t simply vanish altogether, of course. That situation sounds a lot like what happened when automobiles disrupted railroads in 1910.

In the U.S., the first trains started rolling in the 1830s. This became the literal and figurative engine of the economy in the 19th century. By 1870 alone, there was nearly 50,000 miles of track in operation, and that figure would eventually hit 250,000 miles by 1930.

But like retail space, thinking about railroads in purely nominal terms—miles of track in operation—isn’t so helpful given population growth. But using census data, it’s possible to create a measure like retail floor space per capita: feet of railroad lines per capita. This conveys how many linear feet of rail line was in operation per person at any given point in time.

After crunching some numbers, we can find something like looks rather familiar. In 1840, there was a mere .85 linear feet of track per capital in the U.S., but a decade later, the figure stood at 1.95 feet, more than doubling yet again by 1860, when it hit 4.75. By 1890, it reached 13.71 feet and then leveled off, though it went marginally higher by 1910, reaching 13.76 feet per capita.

Much like the overbuilt retail sector today, many of these lines couldn’t turn a steady profit because the market was completely saturated. Then came Ford Motor Company, which soon began churning out massive quantities of affordable automobiles. Not surprisingly, the arrival of the automobile neatly coincides with the precipitous decline of the railroad.

While the total mileage of railroad hit a nominal high in 1930, the per capita mileage was already in free fall at this time, as cars become commonplace. It was already down to 9.75 by 1940, dropping still further to 5.36 by 1970. The following decade was especially damaging, with the bankruptcy of the Pennsylvania Railroad, and it continued to decline, dropping to 1.64 linear feet per capita by 2010. It has more or less remained at that level since that time.

And that is the likely fate of conventional retail. Like the railroad, there’s an extraordinarily surfeit of retail space built with little consideration of what the market will actually sustain; recent declines in the retail revenue per square foot in brick-and-mortar stores suggests that things are getting worse, fast. And like the railroad, there’s a new way of doing business on the block, except that instead of changing how we move people and goods, online retailing promises a new way of delivering them to the end consumer.

If the per capita retail footprint declined as much as the railroads did, it would fall all the way down to 2.82 square feet per capita. That’s a lot of empty malls and defunct big box stores, but retail won’t disappear any more than the railroads have gone extinct.

In fact, in 2014, the inflation-adjusted revenue that railroads earn per mile of track is 2.7 times what it was a century ago. More startling still, the so-called “ton miles” of freight carried on the nation’s railroads (a ton mile is one ton of freight carried one mile) has tripled since 1960, even as the total size of the operational railroad system has declined dramatically.

That points to the likely future of conventional retail: a drastic reduction in the per capita footprint, with the remaining stores capable of earning far more money per square foot. It’s not the brightest of futures. But it’s also not the end of the world.