Excluding traffic acquisition costs -- revenue shared with partners -- Yahoo had sales of $1.08 billion, just below estimates of $1.1 billion. That was a 5% decline from the second quarter of 2010.

Yahoo (YHOO, Fortune 500) attributed the decline to the sizeable chunk of its sales that it hands over to Microsoft (MSFT, Fortune 500) -- whose Bing technology underpins Yahoo's search site. As part of that deal, Yahoo hands over 12% of its search advertising revenue to Microsoft.

Shares fell almost 4% in after-hours trading immediately following the report, but they recovered to about a 2% decline later in the evening.

Yahoo forecast that it will bring in third-quarter revenue between $1.05 billion and $1.1 billion, excluding the traffic acquisition costs. Analysts were expecting a forecast of $1.12 billion. Yahoo expects to pay Microsoft $35 million in revenue in the third quarter as part of the Bing search deal.

The company had $3.26 million in cash on hand as of June 30. Yahoo noted that it repurchased 30 million shares for $472 million during the second quarter.