Instagram has been a major thorn in the side of Snap (NYSE:SNAP) ever since it launched Instagram Stories a couple of years ago. It was evident as early as Snap's IPO filing that Instagram was cutting into Snapchat's user growth.

However, Snap has always been able to tout its clout with teens. Teens are an extremely valuable user base for digital advertisers, especially those with less targeting data, like Snap. While Facebook (NASDAQ:FB) has enough data to target direct advertisements to the exact right people at the exact right time, Snap is more reliant on brand advertising. And brands like teens because they can establish brand loyalty from an early age and have a customer for life.

Snap might not be winning the popularity contest with teens anymore, though. More American teens use Instagram in any given month than Snapchat, according to Piper Jaffray's latest Taking Stock With Teens survey.

Teens looking at their phones by school lockers.

Image source: Getty Images.

Taking the lead with teens

Piper Jaffray's survey found that 85% of teens used Instagram at least once per month compared to just 84% for Snapchat. That represents a reversal of the last couple of years of surveys, which found Instagram trailing Snapchat by one or two percentage points in each period.

The two are still, far and away, the most popular social media apps used by teens. The next closest competitor is Twitter, which 47% of teens said they used at least once per month.

What should be more concerning for Snap investors, though, is that Instagram is closing the gap between itself and Snapchat when it comes to which social media app teens prefer. While Snapchat is still the preferred app of 46% of teens, about flat from where it's been in the last two semi-annual surveys, 32% said they prefer Instagram. That's up 8 percentage points from this time last year.

The last time the gap between Snapchat and Instagram was this close was just after Instagram launched Stories two years ago.

Still, the trend is much less about what Instagram is doing right than it is about what Snap has done wrong recently. A series of missteps revolving around its app redesign led many users to abandon the platform. Snap reported its first ever decline in daily active users as part of its second-quarter results. The redesign may have led more users to move back to Instagram and its similar stories product.

Not everything is roses for Facebook

While Instagram is gaining popularity with teens, its parent company, Facebook, is seeing them abandon its flagship platform. Just 36% of teens surveyed said they used Facebook at least once a month. That's down from 45% last year and 60% in the spring of 2016.

Facebook has been talking about its challenges with engaging teens on its main platform for several years. Last year, more and more signs started appearing that Facebook's challenges with teens were really having an impact on usage and engagement. Another considerable drop in teen usage this year indicates that Facebook still has work to do.

Importantly, Piper Jaffray's survey shows lower usage among younger teens compared to older teens. And looking back at past surveys, the engagement among 14- and 15-year-olds increased only slightly as they got older. If that behavior stays consistent among today's 14- and 15-year-olds, Facebook could see a continued decline in usage among teens.

Winners and losers?

Snap losing its pull with teens (and advertisers targeting teens) is a major blow to the company. Snap is currently shifting to a programmed auction format for ad sales instead of direct sales to marketers. The shift has resulted in a massive decline in average ad prices, but that will turn if Snap can attract more advertisers to the platform to increase the amount of bidding. Still, without a ton of teen users, Snap's appeal to advertisers isn't as strong.

Facebook isn't exactly a winner, though. While it's gaining popularity with Instagram, that's offset by the decline in Facebook usage among teens. Facebook is already fully monetized, so replacing time spent on Facebook with time spent on Instagram isn't exactly a one-for-one trade for the company. The good news for investors, though, is that Instagram could provide more lucrative advertising opportunities in the future with its more popular stories format and more visual nature of the app itself (which lends itself to eye-catching advertisements).

Adam Levy owns shares of Facebook. The Motley Fool owns shares of and recommends Facebook and Twitter. The Motley Fool has a disclosure policy.