Best Buy has been working on a turnaround plan as it faces increased competition from online retailers and discount stores. The plan includes closing stores, cutting costs and investing in training for employees. In April, it also said it would sell its 50% stake in its European joint venture, in order to streamline its business and strengthen its balance sheet.

The company's chief executive, Hubert Joly, said it was working on improving its e-commerce offerings, replacing its search platform with better technology, redesigning parts of its website and making other website upgrades. The changes are needed because 80% of all customers who are planning to buy gadgets worth $100 or more are now researching the product online before going into a store, Joly said.

"That means 'showrooming' is not starting in our retail store, it is starting online and we are not showing up on the first page a fair share of the time," Joly said.

Brian Sozzi, chief executive and chief equities strategist at Belus Capital Advisers, said the report showed that Best Buy's restructuring is beginning to pay off. "Best Buy is starting to run a tighter ship in which demand is properly aligned with inventory," he said. Key to this, he said, was the company's "operational overhaul that is both removing oodles of wasteful processes and repositioning the company for relevance in a competitive industry".

The electronics retailer says net loss for the three months ended 4 May after paying preferred dividends totaled $81m, or 24 cents per share. That compares with net income of $158m, or 46 cents per share, last year. Excluding restructuring costs and costs related to selling its stake in Best Buy Europe, it earned 36 cents per share. That beat the 24 cents per share that analysts expected, according to FactSet.

Revenue fell nearly 10% to $9.38bn, excluding European revenue. Including revenue from its European joint venture that it is selling, revenue totaled $10.8bn, the company said. That is ahead of analyst expectations of $10.67bn. Revenue in stores open at least one year fell by 1.1%. The measure is a key gauge of a retailer's expectations because it excludes stores that open or close during the year.

Joly said results were hurt by the shift of the Super Bowl, which typically drives TV sales, into the prior quarter, and the decision to reduce sales in some non-core businesses. Best Buy's chief financial officer, Sharon McCollam, said the company expects the price competitiveness that hurt per share results in the first quarter will continue into the second. She added that adding Samsung store-within-stores and restructuring retail floor space at some stores was expected to hurt some stores as well.

The investments in its turnaround plan, however are expected to be "substantially offset" by the company's cost cutting initiatives.

Best Buy shares fell $1.26, or 4.7%, to $25.55 in afternoon trading. The stock has traded between $11.20 and $27.37 over the past 52 weeks.