Pinterest (PINS 0.02%) investors are having a great week. After Pinterest reported its best growth in three years Tuesday -- sales up 23% in Q1 2024 -- and predicted its momentum will continue into Q2, with sales rising another 18% to 20%, shares of the social media company surged 21% in a single day.

And that may be just the start. On Wednesday, StreetInsider.com spotted RBC Capital analyst Brad Erickson predicting Pinterest stock, which rose to $40 after earnings, will travel 30% higher, ending at $52 within a year.

Is Pinterest stock a buy in 2024?

Pinterest CEO Bill Ready credited "investments in AI and shoppability" for "driving even greater returns for advertisers," and Erickson agreed that advertisers are giving Pinterest more business as they see better returns on their ad spending.

The analyst is especially enthusiastic about direct links, which allow Pinterest users to click straight through to advertiser websites, resulting in more sales. And he is upbeat about Pinterest's use of artificial intelligence to measure the effectiveness of these click-throughs. All of these things, says Erickson, promise to turn into multiyear tailwinds for Pinterest stock.

And here's the best news of all: Pinterest probably only needs the winds to keep blowing right this year to turn its business profitable again. Already free-cash-flow-positive, and with free cash flow expected to more than double through 2028, most analysts agree Pinterest will earn positive GAAP (unadjusted) profits of $0.41 per share in 2024 -- and profits are expected to quadruple through 2028.

What this all works out to is a stock trading for nearly 100 times current-year profits, but only about 32 times current-year free cash flow. And considering the stock is expected to grow its profits at 37% annualized over the next five years, that sounds like a bargain to me.

For this reason I conclude that RBC is right to recommend buying Pinterest stock.