Macy's said Thursday that it planned to close about 100 stores next year and boost its online investments as the nation's largest department store chain tries to become more nimble in an increasingly fierce market. The closures represent close to 14 percent of its stores under the Macy's brand. The company, which operates the upscale Bloomingdale's stores as well, said it would increase its exclusive products and would prioritize its investments in the stores that offer the highest growth potential. Macy's also reported Thursday that second-quarter profits and sales fell. The results, however, beat Wall Street estimates, and its shares rose about 17 percent for the day. "The announcements we are making today represent an advancement in our thinking on the role of the stores, the quality of the shopping experience we will deliver, and how and where we reinvest in our business for growth,'' said Macy's President Jeff Gennette, who will succeed Terry J. Lundgren as CEO in the first quarter of 2017. Macy's had been a stellar performer since the Great Recession, but in the past year and a half, the company has seen slowing sales as it battles competition on all fronts and changing shopping patterns. People are spending more of their money on home improvement as well as experiences like travel or spas. And when they do buy clothing, they're going to T.J. Maxx or fast-fashion chains like H&M. They're also increasingly researching and buying online, and gravitating toward Amazon.com, which is bolstering its store private label fashion brands. Amazon.com is by some forecasts expected to surpass Macy's as the largest online seller of clothing next year. Looking for sales boost Under Lundgren, Macy's hasn't been sitting still and has been looking for opportunities to boost sales, from buying upscale beauty brand Bluemercury to launching its own off-price stores called Macy's Backstage. But since this past May, it has sought to accelerate its efforts to get shoppers excited. It planned to look for new ways to cut expenses and use that money for more sales help at the stores and online. And it's expanding its offerings on exclusive launches, including one backed by Sir Elton John and Lady Gaga. With the closures, Macy's will have 666 stores, including 38 Bloomingdale's locations. That's down about 23 percent from a peak in January 2007 of 868 stores including Bloomingdale's. Annual net sales at the stores Macy's plans to shutter were estimated at $1 billion. Many of the stores will close in early 2017, with the balance closing as leases or other agreements expire or are amended. Macy's said it earned $11 million, or 3 cents per share, in the quarter ended July 30. That compares with $217 million, or 64 cents per share, in the year-ago period. Excluding charges that are related to store closings, the company earned 51 cents, which is above the 48-cent estimate from FactSet. While Macy's earnings beat Wall Street expectations, it still has a long way to go to see business perk up. Revenue fell 3.9 percent to $5.87 billion. That topped the $5.77 billion estimate from FactSet. Revenue at stores open at least a year were down 2 percent in the second quarter. Excluding licensed departments, sales were down 2.6 percent. That's the sixth straight decline for that measure. The company said it was sticking to its outlook. Macy's had said in May that it expected revenue at stores open at least a year to be down 3 percent to 4 percent. Macy's also said it still expects earnings to be in the range of $3.15 to $3.40 for the year.