The first several months of 2023 have been pretty good for growth stocks across the board. After an ugly run in 2022, the Vanguard Growth ETF is up 19.3% this year.

While this has been a better year for growth stocks in general, it's been an exceptional year for both Shopify (SHOP 0.65%) and Duolingo (DUOL -0.89%). Lots of encouraging news has been driving their share prices through the roof.

Why Shopify is up 82% in 2023

Shares of Shopify recently spiked in response to a big announcement in its first-quarter earnings report. The company is selling its logistics business to one of its fulfillment service partners, Flexport.

Shopify's stock price has been under pressure ever since late 2021, when management told investors it would plow resources into a fulfillment services network that it hoped could eventually rival Amazon's. Instead, after a relatively brief effort that include the purchase of Deliverr, the company decided to sell its whole logistics business in order to focus on developing and marketing e-commerce software, an area where it already shines.

Shopify is getting 13% of Flexport in exchange for its assets. It already had an equity stake in Flexport, so this deal will raise its total ownership to a percentage in the high teens. Flexport will become Shopify's preferred logistics provider, so its many merchants should hardly notice the transition.

In the first quarter, the company reported a $68 million net profit, which was a vast improvement over the losses it reported during its short-lived attempt to become a leading warehouse operator.

SHOP Net Income (Quarterly) Chart

SHOP Net Income (Quarterly) data by YCharts.

It could be a while before Shopify's bottom line returns to the levels we saw during the social-distancing stage of the pandemic, but stronger profitability in the quarters ahead seems likely. In addition to selling its logistics business, the company announced a 20% staff reduction.

Why Duolingo is up 108% in 2023

Duolingo is the company behind the leading language-education app of the same name. The stock keeps climbing in response to highly encouraging user engagement metrics that suggest its freemium model is working even better than expected.

During the first quarter, the number of daily active users shot 62% higher year over year to 20.3 million. Now, 28% of monthly active users are also daily active users, up from 25% a year earlier.

Investors are also highly encouraged by an increasing rate of conversions. At the end of the first quarter, 8% of Duolingo's monthly active user base was paying for a premium subscription compared to 6.8% a year earlier.

Educational software companies have generally lousy track records as investments because people don't tend to stick with their products for long. Duolingo's engagement metrics suggest its relentless commitment to improving engagement could make it an exception to the rule.

Good stocks to buy now?

Duolingo's still in a high-growth mode, but it's steadily moving toward profitability. Its first-quarter net loss narrowed to just $2.6 million from $12.2 million a year earlier. Earnings before interest, taxes, depreciation, and amortization (EBITDA) came in at 13.1% of total revenue compared to 4.9% of revenue last year.

At the moment, Duolingo trades at 15.8 times trailing sales. While the business is growing fast enough to warrant such a high valuation, investors should understand that the stock will likely plunge if investors sense any hint of a slowdown on the path to profitability over the next several quarters. 

Unlike Duolingo, Shopify has a history of sustainable profitability that took a temporary wrong turn due to the fulfillment service investments that it's selling to Flexport. Currently, you can buy Shopify shares for 17.6 times its earnings from 2021. That was a banner year for the company due to the pandemic, but its best days are still ahead. This stock looks like a smart buy now despite its recent run-up.