Best Buy has been dealing with increased competition from online stores, notably Amazon.com, and discounters like Wal-Mart. Under CEO Hubert Joly, the company has tried to turn around results, revamping merchandise, training employees and cutting costs.

That hasn't been enough to reverse a sales decline. Revenue in stores open at least 14 months, a key retail metric, fell 1.2 percent in the U.S. during the quarter, which includes the key holiday season. November and December can account for up to 40 percent of total sales for retailers.

But it was better than the 3.2 percent decline in revenue the entire consumer electronics industry faced, according to NPD data Joly cited.

"The fourth quarter was an environment of declining retail traffic, intense promotion, fewer holiday shopping days and severe weather," Joly said in a statement. "In the face of these unusual circumstances, our strategy to be price competitive and provide an improved customer experience resulted in market share gains in a weaker-than-expected consumer electronics market."

Best Buy has also introduced shop-within-shops — dedicated store space and signage for top brands like Apple, Samsung and Microsoft.

"We expect more and better of the same in this category," Joly said.

The company has cut costs aggressively and during the quarter, annualized cost reductions increased by $260 million.

Total annualized savings have now reached $765 million, exceeding the target laid out by Joly in 2012, and on Thursday, Best Buy upped that target to $1 billion.

Net income after paying preferred dividends totaled $293 million, or 83 cents per share. That compares with a loss of $409 million, or $1.21 per share last year.

Excluding one-time items such as restructuring costs, asset impairments and other costs, net income was $1.24 cents per share, easily beating the $1.01 that analysts had projected, according to a poll by FactSet.