Earnings season is upon us, with many stocks reporting their financial results for the three months ending in June. One stock to watch closely is Spotify (SPOT -3.40%). The market was impressed when the company released its second-quarter earnings last week, sending shares up over 10% the day of the report. Combine a fast-growing user base with numerous new monetization strategies and it is no surprise that investors are optimistic about Spotify's prospects.

Should you buy shares of Spotify after its latest earnings rip? Let's investigate.

Q2 earnings looked good

Spotify released its Q2 results on July 27. Monthly active users (MAUs), a key metric for measuring engagement, hit 433 million, up 19% year over year. This was significantly ahead of Spotify's own expectations of 428 million MAUs. With the service opening up in 85 new markets last year, including large ones across Africa and Asia, it is nice to see user growth accelerate. Eventually, management thinks Spotify can hit 1 billion or more MAUs, with a target of reaching this milestone by 2030.

MAU growth is important, not only because it means more engagement but because it feeds into Spotify's music subscription business. In Q2, the company had 188 million paying subscribers around the world, up 14% year over year and beating its own guidance of 187 million. This translated to $2.56 billion in premium revenue in the quarter, up 22% year over year. Premium revenue outpaced subscriber growth because of price increases and changes in foreign currency exchange rates.

Hitting further down the income statement, Spotify's premium business had a 28.8% gross margin in Q2 (excluding costs from stopping Car Thing manufacturing and accrual payments), which was flat year over year. Over the next few years, investors should expect premium gross margins to expand to 30% or higher due to the growth of Spotify's two-sided marketplace where artists and labels can pay to promote their music.

Rapid growth in nonmusic

The premium business looks to be in fine shape, but the highlight again from this quarter was growth in advertising revenue. The segment hit $368 million in revenue, up 31% year over year, making up 13% of overall sales. Advertising has been a big push for Spotify to monetize its non-music business, which is mainly podcasts right now. According to the Q2 results, podcast revenue grew in the "strong double-digits" year over year, but investors did not get an exact number. Advertising gross margin was only a measly 1.1%, but that is occurring because of all the up-front investments it has to make to build out its audio advertising network.

Over the next few years, Spotify's advertising gross margins should expand higher once it builds out its content and advertising technology around the globe. This will help the company expand its overall gross margins and start generating healthy cash flow. 

Beyond podcasts, Spotify recently closed its acquisition of Findaway, an audiobook distribution service. Audiobooks are the next big product Spotify wants to win after podcasts, and there will apparently be a product launch in Q3. It is unclear how Spotify plans to monetize audiobooks on its platform, but it is another way to keep people engaged and make money. Hopefully, it can help keep revenue growing at 20% or higher for years to come. 

Valuation is still appealing

If you're considering investing in Spotify, don't feel like you missed the boat. Even after this earnings pop, the stock is still down 50% this year and has a market cap of just $22 billion. With $11.2 billion in trailing-12-month revenue, the stock trades at a price-to-sales ratio of 1.96. Assuming the company can hit its long-term target for 10% operating margins, that would give the stock a theoretical price-to-operating income of 19.6.

Considering how fast revenue is growing and the potential with podcasts and audiobooks, Spotify stock looks much too cheap if the company can reach its 10% operating margin goal. That makes the stock a buy right now.