When it comes to the digital economy, Sea Limited (SE -0.69%) is a triple threat. It operates three main business segments: e-commerce, digital entertainment (gaming), and digital payments. 

Sea Limited was popular among investors throughout 2020 and 2021 because the stay-at-home economy was a tailwind for its portfolio of digital platforms. Its stock soared nearly tenfold during that period, which reflected the company's lightning-quick sales growth. 

But the stock has since plunged 77% from its all-time high as investors began to prioritize profits over growth in 2022, and unfortunately, Sea Limited had always sacrificed its bottom line in favor of expansion.

But that changed in the recent fourth quarter of 2022, much to the market's surprise, sending Sea Limited stock soaring 21% in a single day. Here's how the company is now turning its fast-paced growth into profits and why it makes sense to buy the stock now. 

Sea Limited's operational diversity is the key to its success

Despite choppy economic conditions with inflation surging and interest rates on the rise, Sea Limited's e-commerce segment -- which is its largest driver of revenue -- has been incredibly resilient. It's led by the Shopee mobile app, which is a hybrid consumer-to-consumer and business-to-consumer marketplace with a dominant position in Southeast Asia. It also has a growing presence in emerging markets like South America.

Shopee is regularly the top-ranking shopping app in Alphabet's Google Play store by time spent in-app and downloads and often ranks second for monthly active users. In 2022, it drove Sea Limited's e-commerce revenue to a whopping 42% growth rate compared to 2021. 

For context, online sales at e-commerce giant Amazon actually shrank by 1% last year. Amazon's e-commerce business generates about 30 times more revenue, but investors should be encouraged by Sea Limited's growth in this area during an exceptionally tough time for consumers. 

But Sea Limited's digital entertainment segment isn't faring quite as well. Its gaming business, headed by the Garena development studio, was a standout performer during the worst periods of the pandemic. It's responsible for the global smash-hit Free Fire battle royale mobile game, which has amassed over 1 billion downloads. 

But as society has mostly reopened, people are spending less time at home and enjoying fewer hours in front of screens. As a result, after Sea Limited's digital entertainment revenue grew by a whopping 77% and 114% in 2020 and 2021, respectively, it shrank by 10% in 2022. 

Its quarterly active user base has also shrunk 33% from an all-time high of 725 million in mid-2021 to 485 million at the end of 2022. But that's still well above the 354 million figure from the end of 2019 (pre-pandemic), so if the user base stabilizes around current levels, that still keeps the segment on a longer-term growth trajectory. 

Sea Limited has been a financial powerhouse

The combination of Sea Limited's segments brought in $12.4 billion in revenue during 2022, representing 25% growth year over year in the face of really tough economic conditions. Perhaps the most impressive part is that it managed to grow while slashing its sales and marketing costs by $560 million at the very same time -- or 14% compared to 2021. 

It highlights the stickiness of assets like Shopee, which did $73 billion in gross orders throughout 2022. That was up 17% year over year, and since its revenue growth rate was more than double that, it indicates it successfully raised prices on its users (the percentage it takes from each transaction) -- without impacting volume. 

Given the popularity of Sea's portfolio of digital platforms, it's little wonder the company has grown its revenue by 1,092% over the last five years. It has come a long way since generating $1 billion in annual sales for the first time in 2018. 

A chart of Sea Limited's annual revenue from 2018 to 2022.

This key milestone sent Sea Limited stock soaring

But the big surprise in Sea Limited's 2022 financials was its fourth-quarter profit. After always prioritizing growth up until this point, the company set out to improve its bottom line to adapt to the current environment where investors are punishing shares of loss-making enterprises.

The company's $422 million Q4 profit came on the back of a 22% decline in operating expenses. That included a whopping 61% cut to sales and marketing -- a reduction of nearly $750 million in dollar terms.

To put it plainly, the bottom-line result was a $1 billion improvement compared to its $616 million net loss in Q4 2021. 

A chart of Sea Limited's quarterly net income (losses) from Q4 2021 to Q4 2022.

It was enough to send Sea Limited stock soaring 21% on the day of its financial report. Even still, it trades at a price-to-sales ratio of just 3.5 at the moment, which is near the cheapest valuation since it became a publicly traded company in 2017. 

Sea Limited is sending all the right signals to investors, so this might be a great chance to buy in for the long term while its stock sits at a 77% discount to its all-time high.