Source: via Flickr.

Study after study has shown that one mistake costs investors billions of dollars each year, yet investors keep making it. This mistake happens primarily because investors are emotional and overconfident. Read on to learn what the mistake is, how you can avoid it, and even how you can profit from it.

Ready for it?

The No. 1 investing mistake everyone makes
We trade far too much -- and often at the worst times.

With stocks, people frequently get caught up in the hype surrounding a stock with a great story. They overlook the risks because they want the story to work out. When the stocks drop they sell, locking in their losses. Great recent examples include Tesla, GoPro, GT Advanced Technologies, Plug Power, and most of the marijuana-related stocks.

Even with mutual funds, this remains true. Financial data firm Dalbar annually updates its quantitative analysis of investor behavior study, which shows how the average fund investor performed over various time periods in comparison to the markets. The findings don't change much year to year: "The results consistently show that the average investor earns less than mutual fund performance reports would suggest."

Source: Dalbar.

As Dalbar points out, by definition, "the average investor cannot be above average," but the average investor would do nearly 80% better if he or she simply earned the average market return. The S&P 500 returned an annualized 9.22% over the 20 years Dalbar looked at, while the average mutual-fund investor earned just 5% per year.

In dollar terms, average mutual-fund investors who invested $10,000 two decades ago would have $26,500 today. An investor in the S&P 500 would have $56,000. That's over double the return for far less work.

Why does this happen?
Investors have a tendency to buy high and sell low. YiLi Chien, a senior economist at the St. Louis Federal Reserve, recently showed how investors tend to buy into mutual funds after their performance rises and sell out as performance drops.

Dalbar has found that the greatest losses for the average investor occur shortly after market declines: "Investors tend to sell after experiencing a paper loss and start investing only after the markets have recovered their value. The devastating result of this behavior is participation in the downside while being out of the market during the rise."

How can you overcome the biggest investing mistake?

Have a long-term plan
As the saying goes, "If you fail to plan, you are planning to fail."

In investing you need a written plan, otherwise known as an investment policy statement, about what you will do with your money and your investments. This should be no longer than one page, be written by yourself, and include your objectives, plan, and how often you will monitor your investments. Creating your own investing plan helps you make thoughtful, rational decisions.

Stick to it
This is simple but not easy. I suspect you made your plan when you were in a good place financially and things were going well. When times are bad, however, people's emotions take over, and their risk tolerance goes down.

While Warren Buffett has advised lethargy in investing, a better tactic to make sure you stick to your plan might be amnesia. Investor James O'Shaughnessy recently told a great anecdote: "Fidelity had done a study as to which accounts had done the best at Fidelity. And what they found was ... they were the accounts of people who forgot they had an account at Fidelity."

Emotional intelligence is far more important than IQ in investing. As Buffett put it: "The most important quality for an investor is temperament, not intellect. You need a temperament that neither derives great pleasure from being with the crowd or against the crowd."

Know your circle of competence
Our emotions take over from the deliberate side of the brain when we are in over our heads and sense danger. This fight-or-flight response has evolved over millions of years, so it won't change anytime soon. We can, however, override our emotional side by being prepared and knowing what we are doing.

Pilots, first responders, quarterbacks, and many other individuals who work under high pressure train to make split-second decisions when their emotions are running high. The same idea applies to investing.

The important part is to stay within your circle of competence with your investing. As Warren Buffett explained:

What an investor needs is the ability to correctly evaluate selected businesses. Note that word "selected": You don't have to be an expert on every company, or even many. You only have to be able to evaluate companies within your circle of competence. The size of that circle is not very important; knowing its boundaries, however, is vital.

It's key that you prepare by studying companies in your circle of competence and find out where they succeed and where they fail. By doing this work when times are good, you can profit when investors who are less familiar with the company panic-sell based on short-term setbacks.

Successful investing is simple, but that doesn't mean it's easy. It's good to remember that the future is always uncertain, so it is always a difficult time to invest. By having a strategy, sticking to it, and knowing your circle of competence, you can overcome the top investing mistake everyone makes -- and profit when other people succumb to it.