Published: Jul 17, 2012 5:45 PM EDT
Updated: Jul 18, 2012 6:30 AM EDT

JACKSONVILLE, Fla. (AP) - Freight railroad CSX Corp. said that second-quarter profit rose just 1 percent and sales were flat amid weak demand for hauling coal used to generate electricity.

Power plants aren't using as much coal as they used to because they're switching to cheap natural gas. And the weak economy is hurting electricity demand. That's having a domino effect on railroads, which depend heavily on carrying coal from places like Appalachia and the Power River Basin in Wyoming to power plants around the country.

Coal accounts for more than one-fourth of the company's sales, and coal shipments and revenue dropped 14 percent from a year ago.

CSX managed to offset the weakness in utility coal by shipping more autos and automotive parts - revenue rose 34 percent - plus coal used in foreign steel-making operations. It also benefited from more intermodal shipping, such as deliveries that start on rail cars before winding up on the backs of trucks.

CSX said Tuesday that it earned $512 million, or 49 cents per share, up from $506 million, or 46 cents per share, a year earlier. Analysts expected 47 cents per share.

Revenue was $3.01 billion, $70 million or about 0.2 percent lower than a year ago. That fell short of the $3.04 billion estimate among analysts surveyed by FactSet.

The railroad charged on average 6 percent more for merchandise shipments than a year ago. Coal rates were flat.

Railroads are considered a measure of the broader economy since they haul so many products used by consumers and businesses. Kansas City Southern said Tuesday that its revenue rose a modest 1.9 percent and coal shipments slipped, although profit grew because of a restructuring gain.

Union Pacific Corp., the biggest railroad in the U.S., is scheduled to report second-quarter results on Thursday.

CSX, based in Jacksonville, Fla., operates over 21,000 miles of track in 23 eastern states and two Canadian provinces. It finished the quarter with 34,422 employees, an increase of 4 percent from a year ago.

CSX shares, which rose 20 cents to close at $22.79, were up another 11 cents to $22.90 during after-hours trading.