U.S. machinery maker Caterpillar Inc posted stronger-than-expected quarterly earnings on Tuesday and raised its full-year outlook, citing signs of stabilization in the world's credit markets and economies.

The company, the world's largest maker of mining and construction vehicles, reported a second-quarter net profit of $371 million, or 60 cents a share, compared with $1.11 billion, or $1.74 a share, last year.

Sales and revenue fell 41 percent to $7.98 billion.

Stripping out costs associated with layoffs and restructuring, Caterpillar made 72 cents a share. Since the end of 2008, Caterpillar's has cut 17,100 full-time workers.

Analysts, on average, had expected the Peoria, Illinois-based company to report a profit of 22 cents a share on sales of $8.36 billion, according to Reuters Estimates.

The better-than-expected results sent Caterpillar's shares up $3 to $39.65 in premarket trading.

There is still a great deal of economic uncertainty in the world, Jim Owens, the company's chairman and chief executive, said in a statement. But we are seeing signs of stabilization that we hope will set the foundation for an eventual recovery.

Caterpillar raised its outlook for full-year profit, including redundancy costs, in a range of 40 cents to $1.50 with a midpoint of 95 cents a share. When it reported first-quarter results three months ago, Caterpillar put that midpoint estimate at just 50 cents a share.

(Reporting by James Kelleher; Editing by Derek Caney and Maureen Bavdek)