In the first week of 2016, Macy's (M 1.44%) announced plans to close 36 stores during the first few months of the year. This represented a reaction to weak customer traffic and sales throughout 2015.

Macy's comparable store sales declines have continued in 2016, and so management is now taking much bolder actions to get the company back on track. As a result, it plans to close about 100 full-line Macy's stores -- nearly 15% of the Macy's store fleet -- with most of those closures occurring in early 2017.

Macy's plans to close about 100 more stores in 2017. Image source: The Motley Fool.

This downsizing should lead to better long-term profitability at Macy's, while also freeing up a lot of capital. It will also be good for many of Macy's rivals, most notably The TJX Companies (TJX 0.45%).

Shrinking the footprint

Macy's hasn't finalized the list of stores it will close yet, but it clearly has a good idea of where it wants to downsize. "Nearly all of the stores to be closed are cash flow positive today, but their volume and profitability in most cases have been declining steadily in recent years," said incoming CEO Jeff Gennette.

In addition to underperforming stores, Macy's also expects to close a handful of stores that sit on valuable real estate. In some cases, it makes more sense to sell a store building to someone who wants to redevelop it rather than continue to operate it as a retail store.

With a smaller store fleet, Macy's won't need to carry as much inventory. This could free up hundreds of millions of dollars for debt reduction or share buybacks. Furthermore, the company owns many of the stores it will be closing, and it expects to generate substantial proceeds from selling these stores to mall owners, developers, or other interested parties.

One prominent store will close

Macy's did mention one prominent location that is likely to close: the stand-alone Men's Store in downtown San Francisco. Macy's has already entered negotiations to sell this 250,000 square foot store, although the timeframe is not clear yet.

Given the frothy state of the San Francisco real estate market right now, this building is probably worth hundreds of millions of dollars. It's not worth that much to Macy's, though, because the company has a massive (925,000 square foot) store just across the street.

Assuming the sale goes through, Macy's will build a new men's department within its main San Francisco Union Square store. While Macy's would have to shrink some other departments, the result should be a flagship store that is more profitable than ever -- plus a massive windfall from selling the excess real estate.

Downsizing will help competitors

TJX will continue to benefit from rivals' sales declines. Image source: The Motley Fool.

Macy's will retain some of the sales from the stores it closes in nearby stores and online. Even so, it expects to lose about $1 billion in annual revenue from the 100 planned store closures. This lost revenue will flow to a variety of competitors -- but none more than off-price giant TJX.

In the past couple of years, TJX has shown itself to be adept at capitalizing on department stores' woes. For example, last year -- when sales declined 3.7% at Macy's -- sales at TJX's domestic chains (T.J. Maxx, Marshalls, and HomeGoods) surged 8% year over year. In the first quarter of this year, when sales plummeted even faster at Macy's and nearly all of its department store peers, sales growth for TJX's domestic business segments accelerated to 9.3%.

While many department stores are downsizing, TJX continues to open new stores at a steady pace, finding ever more convenient locations for customers. In all likelihood, this will allow it to continue siphoning sales away from Macy's and other department stores. Macy's latest round of store closures will just ease its path toward market share gains.