US stock markets posted their best day in months Tuesday as a string of strong earnings reports from the technology sector lifted investor sentiment.

The Nasdaq Composite surged 3.2%, while the S&P 500 gained 2.1% and the Dow Jones Industrial Average added 1.8%.

Apple reported quarterly revenue of $94.8 billion, exceeding analyst estimates by $2.3 billion, driven by strong iPhone sales in emerging markets.

Microsoft posted record cloud computing revenue, with Azure growing 29% year over year, demonstrating the continued demand for artificial intelligence infrastructure.

Amazon's results were highlighted by a 14% increase in revenue from its advertising division, which has become an increasingly important profit center for the company.