The Cupertino, California company's gain reduced some of the losses it has suffered in recent weeks during a broad selloff in growth and technology stocks.
The world's largest company by market value raked in sales of nearly $124 billion and profit of $34 billion, showcasing its ability to navigate a global supply crunch during the crucial holiday quarter.
"Apple is known for its supply-chain prowess and many wonder about the actions Apple has taken and will take to better position itself for this calendar year," Third Bridge analyst Scott Kessler said.
Apple also teased its metaverse ambitions as Chief Executive Tim Cook talked of the company investing in the expansion of its library of 14,000 augmented reality apps, prompting strong investor response.
At least 11 brokerages raised their price targets for the stock, bringing the median price target to $188.5, according to Refinitiv data. The stock ended Friday at $170.33.
With the Federal Reserve preparing to raise US interest rates, Apple's stock has been under pressure this year from a tech sector selloff, which also hit giants like Alphabet Inc and Microsoft Corp.
Following its quarterly report, Apple on Friday was the top contributor to a rally in the S&P 500 and Nasdaq.
Apple's stock remains down 4% so far in 2022.
"Still a lot of uncertainty about the tech sector, which remains very expensive and with the Fed overhang of possible further hawkish surprises," said Andrea Cicione, head of strategy at TS Lombard.