Should you buy stocks now or wait for a recovery? This is a question many investors are likely asking themselves right now amid this bear market. No one wants to buy a stock only to see it continue falling for weeks, months, or even years. But at the same time, you'll never know for sure when the bottom has been reached until long after a stock has rallied.

There is a potential solution for investors to consider here -- one that could balance both of those risks.

Dollar-cost averaging makes a lot of sense

Dollar-cost averaging is a strategy that involves investing equal amounts of money into a stock at regular intervals. By doing this, you can avoid making one large buy today only to cringe at seeing the stock's value go even lower next month.

Instead, you can spread the total amount of what you plan to invest over several months, a year, or even longer. Then if the stock's price falls, your average cost comes down as you make subsequent purchases. At the same time, if the markets recover and the stock rises in value, then you benefit from those gains.

Here's how it works

Let's take a stock like Teladoc Health (TDOC -1.52%) as an example. It's a leader in the telehealth industry, and the sector is a growing one; analysts from Fortune Business Insights project that it will grow at a compound annual growth rate of 32.1% through 2028, when it will be worth more than $636 billion. Given the potential, a stock like Teladoc could make for a solid, long-term buy.

However, shares of the telehealth giant have been falling sharply this year, down 61% while the S&P 500 has declined by just 21%. Investors may be hesitant to take a chance on the stock given its slowing growth rate. But if the telehealth market generates the gains analysts expect, then Teladoc should make for a top growth stock to own over the long term.

If you had invested $1,000 in the stock at the start of the year, your investment would be worth approximately $390 right now. But if instead you had set aside a plan to buy roughly $167 worth of shares of the stock every month through the first six months of the year, here's how your average would look:

Source: Yahoo Finance. Chart by author.

For the sake of keeping things simple, the chart above assumes a purchase is made on the first trading day of the month at that day's closing price.

By the start of June, your average cost would be just under $56. Your total investment would remain roughly $1,000, but now, with Teladoc's stock trading at around $35, you'd be down 37% instead of 61%. Your investment would be worth $630 versus $390 had you made just one large investment at the start of the year. It's still a loss but a much smaller -- and hopefully temporary -- one given the sector's outlook.

It doesn't always work out this way, but dollar-cost averaging can be a sound strategy when a stock has good fundamentals and promising growth prospects.

Should you use dollar-cost averaging?

Using dollar-cost averaging can be a great way to stay invested in the stock market while resisting the temptation to try to time the market. If you have a quality investment you want to buy and hold, then it's a strategy that can work well for you and lead to some great gains down the road.