In 2022, the stock market had its worst year since the financial crisis in 2008. The S&P 500 declined 19.4%, and many industries were rocked due to inflation, supply chain, and many other issues. But two stocks that were able to prevail and deliver positive, double-digit returns include Jazz Pharmaceuticals (JAZZ 0.80%) and T-Mobile US (TMUS 0.71%). What's noteworthy about these two stocks is that analysts still think they'll rise even further. Let's find out a bit more about these two stocks and why they still have upside potential.

1. Jazz Pharmaceuticals

In 2022, Jazz Pharmaceuticals soundly beat the markets with a return of 25%. The stock got hot in the last quarter of the year after the company released strong quarterly results.

For the quarter ending Sept. 30, Jazz's revenue of $940.7 million was up 12% from the prior-year period, and its net loss of $0.31 per share was a big improvement from the $0.86 net loss per share it reported a year earlier. And based on the strong results, the company also slightly raised the midpoint of its guidance for the year to $3.65 billion (previously, it was $3.6 billion). 

That represents a growth rate of 18% from the roughly $3.1 billion in revenue that Jazz posted in 2021. And by 2025, the company is projecting that its sales could top $5 billion. Epilepsy drug Epidiolex is rolling out to more countries, and Jazz expects that its strong pipeline will result in at least five products obtaining approval before the end of the decade.

Despite the optimism, the stock is trading at only 9 times its future earnings. The consensus analyst price target for Jazz is $202, suggesting that it could rise close to 30% from where it is today. For investors, this could be an underrated growth stock to buy as Jazz trades at a modest valuation and is expecting some stronger financials in the years ahead.

2. T-Mobile

Telecom giant T-Mobile is a business that's powered up and running on all cylinders. The company's focus on developing its 5G network gives it an advantage over its competitors, and that's helping it win over customers.

On Jan. 4, the company posted preliminary numbers for 2022, and T-Mobile is expecting that the 6.4 million postpaid customers it added last year will be an industry best. The company, which likes to call itself the "un-carrier" due to its focus on customer satisfaction and trying to be unlike its rivals, projects not just record numbers of customer growth but churn of only 0.88%, which would be the lowest ever in its history. A low churn rate means the company is doing well at retaining its customers, and loyalty is high.

Through the first nine months of 2022, the company's revenue has been flat as T-Mobile vowed not to raise the price of plans despite inflation. Investors, however, remain focused on the big picture (the stock was up 21% last year) and the potential for T-Mobile to perform much better in the future with a broader customer base, especially now that it has largely decommissioned the Sprint network and its costs related to the merger should lessen in future quarters.

T-Mobile's stock outperformed not just the market last year but its competitors as well, with shares of Verizon Communications falling 24% in 2022, and even AT&T failed to achieve positive returns as its stock fell by 1%. Analysts have set a consensus price target of over $177 for T-Mobile's stock, which is 26% higher than the $140 it finished at last year.