Abbott Laboratories Inc. said Wednesday that its net income fell in the second quarter following the spinoff of its branded drug business, but the results beat Wall Street expectations.

Abbott said sales of nutrition and diagnostic products improved, making up for lower sales of generic drugs and medical devices. The company spun off its branded drug business into a separate company called AbbVie on Jan. 1. AbbVie sells products including the anti-inflammatory drug Humira.

Abbott said its net income fell to $476 million, or 30 cents per share, from $1.73 billion, or $1.08 per share, a year ago. Excluding one-time charges and last year's AbbVie results, however, its earnings rose to 46 cents per share from 43 cents per share. Analysts surveyed by FactSet expected 44 cents per share.

Revenue grew 3 percent to $5.45 billion from $5.31 billion. Analysts expected $5.52 billion in revenue

Shares of Abbott Laboratories gained 31 cents to $36.01 in late morning trading.

The company said nutrition revenue increased 8 percent to $1.7 billion on greater sales of pediatric products in international markets, and greater sales of adult nutrition products like Ensure. Diagnostics revenue rose 5 percent to $1.14 billion. Generic drug sales fell 2 percent to $1.22 billion and medical device revenue slid 2 percent to $1.36 billion.

Abbott backed its guidance for the full year, saying it expects to earn between $1.98 and $2.04 per share excluding special items. Analysts expect $2.01 per share on average.