Sometimes an intelligent investment goes against popular opinion. That might be the case with Peloton Interactive (PTON 2.62%) and Pinterest (PINS 0.89%). Their stock prices have fallen considerably as they face headwinds of varying magnitude. 

Peloton's troubles are more acute, resulting from overinvestment in capacity during its peak sales period. Pinterest's are less so, which could diminish as macroeconomic headwinds reverse. Regardless, it will take time for these companies to get their momentum back.

Peloton and Pinterest stocks could be smart buys if you've got $5,000 you will not need for the next few years. 

Thinking the good times would never end

Peloton's business was tailor-made to thrive during a pandemic. It sells interactive exercise equipment, which experienced a customer interest explosion when governments temporarily forced gyms to close. Peloton could hardly keep up with demand. At one point, customers were waiting over 10 weeks for orders to be delivered.

Sadly, that was the beginning of Peloton's troubles. Management, at the time, thought this surge in customer activity would continue. As a result, it invested aggressively in adding manufacturing capacity. 

Quickly after economies started reopening, demand for Peloton's exercise equipment fell sharply. After rising by over 120% in 2021, sales have decreased in the nine months of fiscal 2022, ended March 31. While total revenue has fallen from $3.1 billion to $2.9 billion, total operating expenses have risen to $2.2 billion from $1.1 billion. Given these circumstances, it's no surprise the stock is down sharply off its highs.

PTON PS Ratio Chart

PTON PS Ratio data by YCharts

However, the crash may be overdone; Peloton is now trading at a price-to-sales ratio of 1.1, near the lowest in its short history as a public company. The newly installed CEO has made several cost-cutting moves to reverse the overcapacity -- for instance, divesting from its own manufacturing and shifting to outsourcing the activity.

Peloton had grown revenue by over 100% in the two years before the outbreak of COVID-19. Given some time, the company will likely return to growth, making this a potentially smart time to buy the stock.

Pinterest has stopped user losses

Like Peloton, Pinterest faces headwinds as consumer behavior shifts again. The image-based social media company thrived when billions of people spent most of their time indoors. Now that folks have more entertainment options outside the home, engagement on the Pinterest app is falling. Monthly active users on Pinterest peaked at 454 million in Q2 of 2021 before falling to 433 million most recently.

Pinterest's app is free to join and use; it makes money by showing advertisements. For that reason, user totals are crucial. Advertisers are willing to pay more if they can influence the purchasing decisions of more people. That can partly explain why Pinterest's revenue growth has fallen from 125% in Q2 2021 to 9% in Q2 2022. These deteriorating prospects could be why Pinterest's stock has fallen 74% off its high.

PINS Price to Free Cash Flow Chart

PINS Price to Free Cash Flow data by YCharts

The fall has Pinterest's stock selling at a price-to-free cash flow multiple of 23, near the lowest in the last year. Pinterest had shown solid revenue growth from $473 million in 2017 to $2.6 billion in 2021. That growth was enough to deliver an operating profit of $326 million in 2021.

The coronavirus pandemic is giving rise to several factors hurting advertising demand, including material shortages, rising costs, and rapidly changing consumer demand. Eventually, these trends will correct themselves as the world progresses in its battle against COVID-19.

But the near-term headwinds allow savvy investors to buy this growth stock inexpensively.