Bear markets can be intimidating, especially when nobody knows for certain how long this volatility will last. Stock prices have been sinking since the beginning of the year, with the S&P 500 down nearly 25% from its peak. Some investors also worry we haven't seen the worst of this bear market, which can make it a daunting time to invest in stocks.

With so much volatility, is it really safe to invest in the stock market right now? Or should you wait until prices start to stabilize? Here's what famed investor Warren Buffett suggests.

Is now the time to invest in the stock market?

The bad news about bear markets is that they can be unpredictable, and it's unclear how long it will take for stock prices to recover. The good news, though, is that now is one of the most profitable times to buy.

When the market is sinking, stock prices are significantly lower than usual. Even strong stocks have seen their prices plummet by 30%, 50%, or more over the past several months. That means right now is your chance to invest in quality stocks while they're essentially on clearance.

This is also Warren Buffett's approach to investing. Back in 2008, at the height of the Great Recession, the Berkshire Hathaway CEO wrote an opinion piece for The New York Times. In it, he explains that despite being in the midst of a global financial crisis, he was continuing to buy stocks.

"A simple rule dictates my buying: Be fearful when others are greedy, and be greedy when others are fearful," he writes. "And most certainly, fear is now widespread, gripping even seasoned investors."

Two secrets to surviving a bear market

While bear markets are unnerving, they can also be fantastic buying opportunities. If you're looking to load up on high-quality stocks for a fraction of the price, now is the time to invest.

However, it's one thing to simply buy stocks; it's another to ensure they survive a market downturn. That is the tougher part of investing, but there are two secrets to keeping your investments safer.

1. Keep a long-term outlook

It could take months or even years for the market to fully recover, but it will rebound eventually. In the short term, there's a chance that your investments will take a hit. Over the long run, though, you're far more likely to see positive average returns.

Buffett also advises taking a long-term approach to investing. "I can't predict the short-term movements of the stock market," he writes. "What is likely, however, is that the market will move higher, perhaps substantially so, well before either sentiment or the economy turns up."

2. Choose the right stocks

Perhaps the most critical aspect of surviving a bear market is choosing the right investments. Not all stocks are strong enough to rebound from market volatility, and if you invest in the wrong places, it could be costly.

The secret is to focus on investing in companies with strong underlying business fundamentals. Organizations that have solid financials, a competent leadership team, and a competitive advantage, for example, are far more likely to survive volatility.

Warren Buffett and his Berkshire Hathaway business partner Charlie Munger also use this strategy when choosing investments.

"[W]e own stocks based upon our expectations about their long-term business performance and not because we view them as vehicles for timely market moves," he explained in a 2021 shareholders letter. "That point is crucial: Charlie and I are not stock-pickers; we are business-pickers."

Investing during a bear market isn't always easy but can be a smart move. The stock market isn't as dangerous as it may seem, and by choosing the right stocks and holding those investments for the long term, you can keep your money as safe as possible.