Warren Buffett’s Berkshire Hathaway (BRK.A) said its net earnings attributable to shareholders climbed to $4.54 billion in the second quarter, reflecting gains from investments and derivatives and higher earnings from non-insurance businesses.

Net income rose to $4.54 billion, or $2,763 per Class A share, from $3.11 billion, or $1,882 per share, a year earlier.

Operating profit at the Omaha, Nebraska-based company rose 5 percent to $3.92 billion, or $2,384 per Class A share, from $3.72 billion, or $2,252 per share.

Analysts on average expected operating profit of $2,170 per share, according to Thomson Reuters I/B/E/S.

Results reflected how some of Berkshire's more than 80 businesses are benefiting from a growing U.S. economy.

Profit rose 10 percent at the Burlington Northern Santa Fe railroad to $884 million as revenue increased from shipping consumer products, industrial products and coal.

Rising demand and prices helped drive a 10 percent increase in profit from utilities and energy businesses to $279 million.

Meanwhile, pretax underwriting gains more than doubled at the Geico car insurance unit to $336 million, as premiums earned grew by 11 percent while underwriting expenses fell.

The quarter also included $622 million of net gains from investments and derivatives, compared with a year-earlier $612 million net loss.

Accounting rules require Berkshire to report these sums with its earnings, and Buffett believes the amounts in any given quarter are often meaningless.

Book value per Class A share, Buffett's preferred measure of growth, rose 2 percent from the end of March to $122,900.

Berkshire's cash stake shrank during the quarter to $35.7 billion from $49.1 billion.

This largely reflected Berkshire's decision to spend about $12.3 billion in June toward the purchase with Brazilian firm 3G Capital of ketchup maker H.J. Heinz Co.

In Friday trading, Berkshire Class A shares closed up $800 at $176,500. Its Class B shares rose 54 cents to $117.82.