By Geoffrey Rogow

Warren Buffett's Berkshire Hathaway Inc. said its second-quarter earnings surged 86%, as a rebound in the stock market offset a profit decline in the company's operations and a large write-down for Precision Castparts Corp.

Berkshire reported second-quarter net earnings of $26.3 billion, or $16,314 per Class A share equivalent, from $14.1 billion, or $8,608 per Class A share equivalent, in the year-earlier period.

Operating earnings, which exclude some investment results, fell to $5.5 billion from $6.1 billion in the year prior. Profits increased within the company's vast insurance operations, especially underwriting, while railroad, utilities and energy, and other businesses declined.

Berkshire took a $9.8 billion write-down for Precision Castparts in the quarter. Berkshire bought Precision Castparts for about $32 billion in 2016. The company, which supplies parts for aircraft makers and makes equipment for power stations and the oil-and-gas industry, has been hurt by the coronavirus pandemic.

Berkshire runs a large insurance operation as well as railroad, utilities, industrial manufacturers, retailers and even auto dealerships. It also holds large investments, especially in the stock market.

Write to Geoffrey Rogow at geoffrey.rogow@wsj.com