Macy's (NYSE:M) plans to close 68 locations in 2017, and Sears Holdings' (NASDAQ:SHLD) Kmart brand plans to shutter 108 stores (though the numbers for both could go higher, and Sears has a significant risk of filing for bankruptcy protection). The impact of those closings will present both positives and negatives, not only for the companies shutting down the stores, but also for consumers and competitors.

A new report from Foursquare examines what happened in 2016 when each of these chains closed stores. The location services company examined foot traffic from more than 50 million monthly global users of Foursquare's apps and websites. The researchers looked at both shoppers who visited closed stores prior to the closure announcement and during the closure period ("typical shoppers"), as well as those who visited to-be-closed stores only after the closure announcement was made ("opportunists").

"When a retailer announces store closures, one might assume that competitors see an immediate benefit. Yet that's not what the data tells us," wrote Foursquare's Sarah Spagnolo. "Instead, Millennials surge to closing sales. Loyal shoppers will stick with the retailers they love, traveling further to stores despite access to fewer locations. And competitive companies will have to wait several months before they see a boost in foot traffic to their stores."

The outside of a Kmart

Kmart has been closing locations. Image source: Sears Holdings.

Millenials are opportunists

Once it was announced that a Macy's or Kmart location would close, Foursquare said, both companies saw surges in customers under 35. Kmart, for example, saw 10% more millennials in the opportunist shoppers who showed up after the closures were announced. Macy's produced similar results with the opportunist group having 8% more millennials than the typical shopper group.

This, Foursquare reported, matched data from Black Friday,when millennial shoppers were willing to visit physical stores as long as there were deals to be had. "Millennials might be pegged as online shoppers, but they shop in stores when they know about a good deal," wrote Spagnolo.

Consumers are brand loyal

Closing stores does not have to mean losing customers. In many cases, loyal fans will travel farther to visit a chain they like after the store closest to them closes. There are limits to that. Foursquare found that displaced but loyal consumers were willing to travel an additional 4.3 miles to visit the next-closest open Kmart while Macy's fans were willing to go an extra 2 miles to shop at another location. (The Macy's number was impacted by the fact that in many cases the company closed stores in part due to how close they were to other locations).

Existing Kmarts that stayed open saw a 39% increase in market share, according to Foursquare. Macy's saw similar gains with its remaining locations seeing a 36% boost in market share.

Rivals gain, but it takes time

When a chain like Macy's or Kmart closes, its rivals do benefit, but it's not immediate. That's partly because closeout sales suck up a certain amount of money that otherwise would have been spent over a longer period of time.

Foursquare's researchers found that T.J. Maxx saw a 47% gain in its market share following a Kmart closure and Wal-Mart had an 8% gain. In the Macy's markets where a store closed. "Marshalls' market share was up 29% relative to its starting point, Kohl's market share was up by 20% and J.C. Penney's market share was up by 10%," according to the report. Dillard's also saw a noticeable spike in sales during the nine-month period after a Macy's closed.

Closings create opportunity

Whether it's Macy's, Kmart, or another brand shuttering a store (and there are going to be a lot of them this year) opportunities are created for rivals, consumers, and the company doing the closing. Clearly it's possible to retain customers even when closing the locations closest to them. Having fewer competitors is also an opening for rival brands to gain some of those forsaken consumers.

For shoppers, however, retail closures create a short- and a long-term opportunity. In the moment, closeout sales offer great deals. In the long run, those same customers should profit from stores seeking their business and the company that closed a location seeking to lure them to travel a bit farther to one of its remaining stores.

Daniel Kline has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.