Macy’s Inc., the second-largest U.S. department-store company, forecast profit for its next fiscal year that is higher than analysts’ estimates and said it would cut 2,500 jobs to reduce costs. It is closing five stores, including one near Rochester.

Profit per share in the year through January 2015 will be $4.40 to $4.50, the Cincinnati-based company said Wednesday in a statement. The average of 19 analysts’ estimates compiled by Bloomberg was $4.36. The job cuts and other actions will save about $100 million a year, Macy’s said in a separate statement.

At a time when many retailers are struggling with restrained consumer spending, Macy’s Chief Executive Officer Terry Lundgren has kept profit growing by adding competitively priced exclusive merchandise and letting lower-level managers tailor assortments to local tastes. He’s also increased online sales by fulfilling Web orders from store inventory.

“Macy’s has dominated the retail scene and gained share over other retailers by giving consumers the promotions they wanted,” said Walter Loeb, founder of a namesake New York retail consulting firm, in a telephone interview today. “Cutting back is also a recognition that technology has worked satisfactorily at Macy’s and that a lot of their new business comes from the Internet.”

Macy’s rose 5.4 percent to $54.65 at 4:40 p.m. in New York in extended trading. The stock advanced 37 percent last year, compared with a 30 percent gain for the Standard & Poor’s 500 Index.

The department-store chain also maintained its forecast that profit per share in the current fiscal year would rise from $3.80 to $3.90. Sales at stores open at least a year will rise 2.3 percent to 2.5 percent in the fourth quarter, Macy’s said. Analysts estimated 2.7 percent, on average.

The retailer plans to report fourth-quarter results Feb. 25.

“Our company has significantly increased sales and profitability over the past four years, and we have created a culture of growth at Macy’s Inc.,” said Terry J. Lundgren, Macy’s chairman, president and CEO in a statement. “As the success of these strategies has unfolded, we have identified some specific areas where we can improve our efficiency without compromising our effectiveness in serving the evolving needs of our customers.”

The cost reductions entail combining its Midwest and North regions, eliminating some merchandise planning and store positions as well as central office and administrative jobs. The company also will close five stores: in the Medley Centre in Irondequoit, near Rochester, as well as in Arizona, Kansas, Missouri and Utah. Macy’s said its workforce will remain at about 175,000 as it adds workers in other parts of the company.

The savings will take effect in the next fiscal year, Macy’s said.

Shares rose 5.5 percent to $54.70 in after-hours trading after closing down 34 cents to $51.84.