Here's what the construction machinery maker reported versus what the Street was expecting:

EPS: $1.28 versus 62 cents, according to a consensus estimate from Thomson Reuters.

Revenue: $9.822 versus $9.271 billion, expected by Thomson Reuters.

Caterpillar's stock was up more than 6 percent in premarket trading following the news. If the 6 percent gain holds, Caterpillar alone will add 40 points to the Dow Jones industrial index for the day.

"Our team delivered outstanding operational performance and, for the first time in more than two years, same quarter sales and revenues increased," CEO Jim Umpleby said in a statement. "We're also benefiting from our significant cost reduction and restructuring actions, which have improved cash flow and further strengthened an already healthy balance sheet."

Caterpillar also raised its guidance for full-year earnings to $3.75 per share from $2.90 per share. The Street expected $3.26 per share. The company also revised its full-year revenue outlook to $38 billion to $41 billion versus the Street's expectation of $38.27 billion.

Caterpillar is expecting modest growth in its construction business for 2017. The company is expecting to benefit from a recovery in the Chinese market for construction equipment.

This is also Caterpillar's first earnings release since three of the company's facilities were raided by federal law enforcement. The Internal Revenue Service's criminal investigation unit, the U.S. Department of Commerce Office of Export Enforcement and the Federal Deposit Insurance Corp.'s Office of Inspector General are investigating CSARL, a Swiss subsidiary of Caterpillar, for what Caterpillar believes are questions about the company's export filings.

During Caterpillar's earnings call Tuesday, Umpleby said the company is complying fully and remains committed to the "highest ethical standard" in its practices.

Wall Street is also closely watching President Donald Trump's policies to determine their impact on the company. While a trillion-dollar infrastructure plan would likely boost companies involved in construction, Caterpillar's international business is vulnerable to any trade-restricting policies.

Shares of Caterpillar have rallied more than 17 percent since November, when Trump won the election. Almost 100 days into his presidency, Trump and the Republican-controlled Congress have yet to introduce a major infrastructure initiative. Caterpillar has said that even if such legislation were introduced, the company does not expect to see a material benefit until at least next year.

Caterpillar announced recently that it will be relocating from its home in Peoria, Illinois, to a new headquarters in the Chicago area, as it looks to tap more talent. Most of the 12,000 manufacturing jobs in Peoria will remain, the company said.