The technology sector roared back to life in 2023 after suffering steep losses in 2022. Investors are particularly focused on companies benefiting from artificial intelligence (AI), and that's where some of the strongest stock market gains have come from over the past year.

Shares of Duolingo (DUOL 2.82%) and Spotify (SPOT -1.16%) have delivered returns of 59% and 130%, respectively, over the past 12 months. Both companies are using AI in their own unique ways, and it could help them accelerate their growth in the coming years.

Here's why it's not too late for investors to buy both stocks.

1. Duolingo

Duolingo operates the world's largest digital language education platform. It takes a mobile-first approach, placing fun, engaging, and interactive lessons at the fingertips of 88.4 million monthly active users. The company has been developing AI since 2013 to enhance the user experience, but is now working with ChatGPT creator OpenAI to accelerate that progress.

Duolingo operates a freemium model, which means it monetizes free users by showing them ads, and it offers paid subscriptions for users who want to accelerate their learning. In the fourth quarter of 2023, a record-high 6.6 million of Duolingo's users were paying a monthly subscription, which was a 57% year-over-year increase. Part of that growth was driven by a new, higher-priced subscription tier called Duolingo Max, which introduced two AI features.

Roleplay is an AI-powered partner for users who want to practice their conversational skills in a foreign language. Explain My Answer, on the other hand, uses AI to provide personalized feedback to users based on their mistakes in a given lesson. Duolingo's long-term goal is to offer a teaching experience similar to that of a human tutor, and these AI tools are an important step in that direction.

Duolingo generated a record-high $531.1 million in revenue in 2023, a 44% year-over-year increase. It was an impressive result considering the tough economic conditions for consumers, led by elevated inflation and rising interest rates. The company also delivered a profit of $17.7 million, which was a big swing from its $58.6 million net loss in 2022.

Duolingo is unique because around 90% of its user growth is organic, meaning the company's marketing costs are relatively small. Its largest expense is actually research and development, where much of the focus is on improving its platform and developing AI.

Duolingo estimates 2 billion people are learning a foreign language worldwide, so it has only scratched the surface of its addressable market. Considering the company's rapid growth, profitability, and future opportunity, it's no surprise its stock soared 59% over the past 12 months and trades near an all-time high. By the same token, it still looks like a great buy right now.

2. Spotify

According to Statista, Spotify is the largest music streaming platform in the world, with a 31% market share. Tencent Music is in second place, with a share of just 14%. Competition is fierce in this industry because every streaming provider offers customers a similar music catalog, so they can only differentiate from one another based on their technology and any other content they can deliver.

On the content side, Spotify is a popular podcast platform, and it's home to the industry's most popular show, The Joe Rogan Experience. The two parties just signed a new deal worth an estimated $250 million over several years. Plus, Spotify became the world's second-largest audiobook platform last year behind Amazon's Audible, with more than 375,000 titles on offer. Spotify Premium subscribers can listen to 15 hours of audiobooks each month with the option to pay extra for more, which creates a new revenue stream for the company.

On the technology front, Spotify uses AI in its content recommendation engine to learn what each user likes so it can recommend more of it, which increases engagement. Spotify also has a feature called AI DJ, which curates playlists tailored to each user, with commentary from a software-generated voiceover.

Outside AI, the company launched a unique feature last year called Clips, which helps artists reach out to their audience. Clips is short-form video-based, so it offers a similar content format to TikTok and Meta Platforms' Instagram Reels, which helps Spotify engage younger users. During the 2023 Spotify Wrapped campaign, 40,000 artists used Clips and generated 725 million views, with more than half coming from users in Generation Z.

Spotify ended 2023 with 602 million monthly active users, a 23% year-over-year increase. The result drove revenue higher by 13%, to a record $14.1 billion for the year. CEO Daniel Ek has a goal to reach 1 billion users by 2030, which implies there is still plenty of growth left in the tank.

Despite the 130% gain in Spotify stock over the last 12 months, it's still trading 17% below its all-time high, which was set during the tech frenzy in 2021. So, despite all the progress the company has made over the last three years, investors can buy the stock today for a cheaper price than where it was trading back then. That spells opportunity, considering Ek's long-term projections for the user base.