Berkshire Hathaway Inc.’s profit rose 8.2 percent in the first quarter as gains at manufacturing units and the investment portfolio overseen by Chairman Warren Buffett offset a slump at insurance units and the railroad.

Net income climbed to $5.59 billion from $5.16 billion a year earlier, the Omaha, Nebraska-based company said Saturday in a statement with preliminary results.

The billionaire has been beefing up the segment of his business that makes products from T-shirts to bricks. In January, he completed a $32.7 billion takeover of Precision Castparts Corp., a supplier to the aerospace and energy industries. A month later, he closed on the acquisition of battery maker Duracell for more than $2 billion.

Results included a profit on Procter & Gamble Co. stock that Buffett traded to that company for Duracell. That helped push investment and derivative gains to $1.85 billion in the first quarter, twice as much as a year earlier. The manufacturing, service and retailing segment contributed $1.27 billion, up from $1.12 billion.

Insurance underwriting income slipped by more than half to $213 million as the company incurred costs from U.S. hailstorms. Profit from the railroad and utilities operation slipped 16 percent to $1.23 billion.

“The railroad earnings are down significantly,” Buffett said at his annual meeting Saturday in Omaha. “All of the major railroads were down significantly in the first quarter and probably will continue to be down, almost certainly will continue to be down the balance of the year.”

Berkshire’s BNSF railroad in January reduced its spending plan for the year, and this month it put 4,600 workers on furlough in response to declining cargo traffic.