Yahoo (YHOO) beat the Street on Tuesday by posting a 28% jump in fourth-quarter earnings, but the Internet giant continued to struggle with search and display prices.

Shares of Yahoo retreated as much as 5% in extended trading despite the bottom-line beat as investors worry about ad sales and new details on Alibaba Group.

Yahoo said it earned $348 million, or 33 cents a share, last quarter, compared with a profit of $272 million, or 23 cents a share, a year earlier. The recent quarter included a $49 million net gain tied to the sale of patents.

Excluding one-time items, it earned 46 cents a share, topping forecasts for 38 cents.

Revenue fell by an in-line 6% to $1.27 billion. Excluding traffic acquisition costs, or TAC, revenue dipped 2% to $1.2 billion, matching the Street’s view for $1.2 billion.

Yahoo said its ex-TAC display ad sales tumbled 8% to $491 million, which is well below the Street's view of $555.43 million. Net display revenue fell 6% year-over-year to $553 million as the price-per-ad dropped 7%, excluding Korea.

Search revenue dipped 4% to $464 million during the fourth quarter as the price-per-click slid 3%. Paid clicks jumped 17% year-over-year.

"I'm encouraged by Yahoo's performance in Q4 and 2013 overall. We saw continued stability in the business, and our investments allowed us to bring beautiful products to our users and establish a strong foundation for revenue growth," Yahoo CEO Marissa Mayer said in a statement.

Investors were also digesting the latest financial metrics on Alibaba Group, the Chinese e-commerce giant that is 24% owned by Yahoo.

According to slides released on Yahoo’s website, the company earned $222 million in the fourth quarter from its stakes in Alibaba and Yahoo Japan. That’s down from $233 million in the third quarter of 2013, but well above the $149 million it earned in the fourth quarter of 2012.

Alibaba is set to go public later this year and accounts for a large chunk of Yahoo's overall market value. 

Yahoo said it repurchased six million shares last quarter for $231 million and used a net $60 million for acquisitions.

Shares of Sunnyvale, Calif.-based Yahoo slumped 3.36% to $36.90 in extended trading Tuesday afternoon. Yahoo shares rallied 4.28% to $38.22 during regular trading, leaving them up almost 88% over the past 12 months.

Follow Matt Egan on Twitter @MattMEgan5