Home improvement chain Lowe's announced the closure of another 51 underperforming stores in the United States and Canada on Monday as it strives to compete with rival Home Depot in a slowing housing market.

Lowe's gave no detail of job losses in the move, which closes stores in some upmarket areas including Broadway and Chelsea in Manhattan and follows the shutdown of 99 Orchard Supply stores in California. (Here is a map of where the store closures are.)

Buffetted in recent quarters by the impact of a long winter in North America, Lowe's has been striving to find ways to catch up with the long-time sector leader Home Depot, each of whose stores on average generate almost twice as much in sales.

There are also signs that Americans are spending less on housing as prices and demand peak after a seven-year homebuilding spree, although many of the factors underlying the industry's health remain in place.

"The decision was informed by the strategic reassessment work we have been doing over the last few months ... We plan to continue to evaluate all businesses and elements of our portfolio annually," the company told Reuters.

While Lowe's is far smaller and less exposed to the arrival of Amazon and other online sellers, the closures follow a wave of similar moves by traditional U.S. retailers in the face of greater online competition.

New Chief Executive Officer Marvin Ellison began a restructuring after taking over in July and has said he was reviewing its real estate portfolio, promising to remove slow-selling products and end unsuccessful ventures.

The wind down of the Orchard Supply chain cost the company between $390 million and $475 million in write-downs. Lowe's said Monday's announcement would result in charges of 28 cents to 34 cents per share, or $300 million to $365 million, in pretax expenses.

The charges were not included in the forecast the company provided in August. At that time, Lowe's said it expected to earn between $4.50 and $4.60 per shares in the fiscal year ending Feb. 1, 2019.

Lowe's will report its fiscal third-quarter earnings on Nov. 20.

The company, which operates about 1,800 U.S. stores and 300 in Canada, said it expects the closures to be completed by February, with the exception of some U.S. stores that are closing immediately.

The 20 U.S. closures are spread across states including New York, Texas and California, with 31 outlets and two plants in a handful of Canadian provinces also shutting.

The majority of the impacted U.S. stores are located within 10 miles of another store.

Shares in the company were unmoved by the announcement.

"We view this as a positive step towards improving productivity of the chain," Credit Suisse analyst Seth Sigman said.

"That said, we continue to look for additional progress in driving higher sales in existing stores, and monitor the investment required to do that."

—CNBC contributed to this report.