The Federal Reserve just cut interest rates for the third time this year and said it will likely pause from here. That scenario is usually very good for stocks.

CNBC used Kensho, a hedge fund analytics tool, to track what happened to the market after the Fed cut interest rates at least three times. In the past 25 years, this has happened on four occasions, and data show that when the third cut was the last cut, stocks got a healthy boost in the following year. When the third cut was followed by more cuts because the economy was slipping into a recession, stocks tumbled.

The central bank's decision Wednesday to lower the overnight lending rate to a target range of 1.50% to 1.75% marks the third rate cut since July, when the Fed lowered rates for the first time since the financial crisis. Powell has attributed the series of cuts to "the implications of global developments for the economic outlook as well as muted inflation pressures."

The FOMC removed a key clause that had appeared in post-meeting statements since June saying it was committed to "act as appropriate to sustain the expansion." This was replaced by a more muted commitment to "monitor the implications of incoming information for the economic outlook as it assesses the appropriate path of the target range for the federal funds rate," the statement said.

Powell later added in a press conference that officials "see the current stance of monetary policy as likely to remain appropriate."

Between 1995 and 1996 and in 1998, the Alan Greenspan-led Fed cut interest rates three times and then stopped, in order to combat an economic downturn and sustain the expansion. In each of these cases the S&P 500 returned 24.76% and 19.39%, respectively, over the next year.

"We've seen periods of economic slowdowns that had three consecutive 25 basis point cuts, most recently in the mid- and late 1990s," said Ryan Detrick, LPL Financial senior market strategist. "The good news is the economy accelerated after the slowdowns and stocks did quite as well."

Evercore ISI Chairman Ed Hyman, who has been ranked the top economist in Institutional Investor's annual poll for more than three decades, told CNBC on Tuesday a three-cut series was the "magic sauce in the 1990s to get growth to stop slowing." The 1998 expansion ended up being the second-longest in history. The economy is currently in the longest expansion.

Historically, the danger for stocks is when the third cut is not the last and the Fed needs to jolt the economy further.

In 2001 and 2007, during the dot-com bubble and the financial recession, the Fed cut interest rates three times and kept cutting in order to boost the economy. During those cutting cycles, the S&P 500 had dropped 12.64% and a stunning 42.37% one year later.

So stock investors should be wishing that this is the last rate cut for a while.

— CNBC's Fred Imbert contributed to this report.