The company said, assuming currency headwind, it expected first-quarter adjusted profit to be between 80 cents and 82 cents per share. Analysts were expecting 80 cents, according to IBES data from Refinitiv.

Oracle has been aggressively pushing into cloud computing to make up for a late entry in the fast-growing business.

Chairman Lawrence Ellison said the company saw a surge in database license sales and a rapid growth in database options required to run Autonomous Database, a cloud-based technology that automates routine tasks needed to manage Oracle databases.

The company added more than 5,000 customers on a trial basis in the quarter, as it migrates database users to the cloud.

Microsoft Corp and Oracle earlier this month announced an agreement to make their two cloud computing services work together with high-speed links between their data centres, which "will only help accelerate the transition from on-premise database to the Autonomous Database service," said co-Chief Executive Officer Safra Catz.

Revenue from Oracle's shrinking hardware business was down 11% this quarter to $994 million (£784 million).

"Our high-margin Fusion and NetSuite cloud applications businesses are growing rapidly, while we downsize our low-margin legacy hardware business," Catz said.

Revenue from the cloud services and license support business, its biggest, rose marginally to $6.80 billion, above analysts' expectation of $6.79 billion.

"The revenue and EPS beat, coupled with upbeat commentary in release should lift the stock, as expectations were low," said Steve Koenig, an analyst with Wedbush Securities.

The company's net income rose to $3.74 billion, or $1.07 per share, in the fourth quarter ended May 31, from $3.28 billion, or 79 cents per share, a year earlier.

Total revenue rose 1% to $11.14 billion, above analysts' expectation of $10.93 billion.

On an adjusted basis, the company earned $1.16 per share beating estimates of $1.07.

The Redwood, California-based company's shares were up 4.6% at $55.12 in after-market trading.

(Reporting by Sayanti Chakraborty in Bengaluru; Editing by Shounak Dasgupta)

By Sayanti Chakraborty