While the Brexit vote in the United Kingdom has triggered fear and panic in the markets, causing stocks to fall around the world, savvy investors understand that moments like these present an opportunity to buy. But instead of just pouring all of your money into the market in one fell swoop, there's an easy and more nuanced strategy that you should follow in order to take full advantage of the turmoil.

In this clip from the Industry Focus: Financials podcast, The Motley Fool's Gaby Lapera and Dan Caplinger discuss dollar-cost averaging, which allows investors to take advantage of downturns in the market in a responsible and rational way.

A full transcript follows the video.

A secret billion-dollar stock opportunity
The world's biggest tech company forgot to show you something, but a few Wall Street analysts and the Fool didn't miss a beat: There's a small company that's powering their brand-new gadgets and the coming revolution in technology. And we think its stock price has nearly unlimited room to run for early in-the-know investors! To be one of them, just click here.

This podcast was recorded on June 27, 2016.

Gaby Lapera: We wanted to reiterate what The Motley Fool's general philosophy was when it comes to these mini -- "crisis" is the wrong word -- these mini economic dips, that this is really an opportunity, especially if you're a long-term investor, to pick up shares on the cheap, especially if you have money that you've set aside for investing. This is such a great time to buy because everything is a lot cheaper now, right?

Dan Caplinger: Yeah. Yeah. We've seen this so many times in the past where it seems like the scariest possible time to put money into the market, but time-in, time-out, it has also turned out to be one of the best times to put money into the market. Even though a lot of people are running scared right now, some of the most successful investors, they're salivating, they're ready to buy into the stocks they've been looking at for a long time at prices that are a lot cheaper than they were just early last week.

Lapera: Yeah. Right now is a great time to be a long-term investor and not a short-term investor. We wanted to talk a little bit about some ways to take advantage of the situation, I guess. Just things that you could set up and just have them running continuously in the background so you don't even notice them.

Caplinger: Yeah. One of the hallmarks of a strong investment plan is that you think upfront how you're going to handle situations like this. How the plan is going to deal with suddenly having an opportunity to get shares of either stocks you like or mutual funds, exchange trade funds, whatever it is, at a cheaper price.

One of the easiest ways to do that is really to set something up in advance. It's called an automatic investing program. Basically what it involves is you pick a certain amount of money that you're going to take out of your bank account and put it toward investments. What the amount is doesn't matter as much as the fact that it's automatic, it happens without you doing anything. You set it up once, you can forget about it at that point, and then month in, month out, that money goes to work for you. In situations like this where the stock market has suddenly gotten a lot cheaper, that same amount of money goes further for you because the cheaper shares, you can pick up more shares with the same amount of money.

Lapera: Right. I think the thing that you are starting to refer to here is dollar-cost averaging, which is an example of an automatic investment program. Dollar-cost averaging is a really, really neat concept. The idea is that you make a schedule where you say I'm going to send, for the sake of easiness on the podcast, $100 a month to my investment account and I have it set to buy these stocks automatically. If stocks are really expensive, you buy less, and if stock's really cheap, you buy more. The cost of the stock kind of averages out.

Caplinger: Yeah. Gaby, I can give you a good example of how that works. Say that you take that $100 that you just talking about and you are interested in a stock, it trades for $25 a share. You do the math, your $100 will buy four shares of that stock at $25 a share. Makes sense right?

Lapera: Right.

Caplinger: If you cut the price of the stock by 20%, say you have a 20% correction, now suddenly those shares cost just $20, your $100 now it's going to buy five shares for $20. You get to take advantage of the fact that the stock fell in price. Basically even though you're putting the same amount of money in, you're actually buying more stock, which is exactly what you want to do in a situation where the price has fallen.

Now similarly in the future when the stock bounces back to $25, that bargain period will be over, you'll go back to that four-share buy instead of the five shares, but you'll have taken advantage of that short-term dip in the market. That's exactly what you want to be thinking about doing in situations like this.

Lapera: Right. The really great thing about this is that this is happening automatically. It's not even something you have to think about, which is why it's so important to always be doing your homework and have an idea of what you are trying to buy and what you want to buy and have these plans set in place ahead of time.

Caplinger: That's exactly right. It's really valuable because if you actually had to do something, then you'd second-guess yourself. You'd think, "Boy, should I buy it now, should I wait for an even better price?" Making it automatic is the best way to make sure that it actually happens and that you get the benefits of it.