In the end, Orchard Supply Hardware’s size was fatal.

With 99 stores, the 87-year-old home improvement chain was too small to move the financial needle for parent company Lowe’s, the second-largest hardware retailer in the world. All of the stores, including around 40 in the Bay Area, will close by the end of the year.

Lowe’s opened dozens of new Orchard stores after acquiring it out of bankruptcy in 2013. In 2014, Orchard leased its first San Francisco store at 2598 Taylor St. near Fisherman’s Wharf, as it sought to grow in urban centers. It later expanded beyond its West Coast roots to Florida.

But the investments didn’t pay off. Last year, Orchard lost $65 million before interest and taxes, Lowe’s CFO Marshall Croom said on a Wednesday earnings call. Orchard had $600 million in sales in 2017, accounting for only 0.8 percent of Lowe’s overall sales of $68.6 billion. Orchard shops tend to be around 35,000 square feet, about a quarter to a third of the size of Lowe’s big box stores.

Lowe’s CEO Marvin Ellison said on the earnings call that the $205 million acquisition of Orchard in 2013 and subsequent expansion “may not have been the most prudent use of capital.”

“The business was just not running well, and as we started to do the strategic assessment of where we wanted to invest our capital and where we wanted to be focused, it became really clear to me and to the leadership team that we want to be focused on our core retail business,” said Ellison, who joined Lowe’s last month after previously leading JC Penney.

Even if Orchard became successful, it would have a “very minimal positive impact” on Lowe’s overall revenue and shareholders, he said.

Lowe’s second-quarter revenue was up 7.1 percent to $20.89 billion, beating analyst expectations amid a strong housing market. Lowe’s expects $390 million to $475 million in expenses related to the Orchard closures in the second half of this year.

Lowe’s shares were up 5.7 percent in trading Wednesday.

“We welcome the decision to exit operations given new leadership has their plate full and doesn’t need another distraction,” wrote analysts from the investment bank Jeffries in a report Wednesday, noting that Orchard was unprofitable.

Orchard Supply Hardware was founded in San Jose in 1931 during the Great Depression, beginning as a farmers’ co-op in the days when the future Silicon Valley was known for crops rather than computers. As the electronics boom transformed the region’s planted fields into residential suburbs, Orchard shifted to become a for-profit retailer selling home repair equipment.

Orchard declared bankruptcy in 2013, just two years after being spun off from Sears and saddled with debt.

August has been full of turbulence for longtime Bay Area retailers. San Francisco’s 157-year-old Gump’s filed for bankruptcy protection and may close by December as it grapples with an aging customer base.

The 52-year-old outdoor apparel company the North Face said last week that it will move its corporate headquarters from Alameda to Denver in part because of high business costs in the Bay Area. Its retail stores won’t be affected.

At Orchard’s San Francisco store on Wednesday, there was still a remnant of the company’s expansion efforts. A sign outside the store read, “Hiring Happy People.”

On Thursday, Orchard will start liquidation sales.

Roland Li is a San Francisco Chronicle staff writer. Email: roland.li@sfchronicle.com Twitter: @rolandlisf