Buying stocks is easier than ever, but that also means it's easier to make rash, quick investing decisions that could impact your portfolio and your financial position. Investors should look to billionaire-investor Warren Buffett as an example of what to do and not do.

Buffett's continued focus on the long term has led to him to become one of the wealthiest people in the world. And the mistakes he notices most investors making are the same -- they don't focus on the long term.

A common mistake

In an interview last year, Buffett said: "90% of the people that buy stocks don't think of them the right way. They think about something they hope goes up next week." He admits the percentage is just pulled out of the air and isn't backed by data, but the conclusion is the same; Buffett believes the vast majority of investors are just looking at how the stock will perform over a short time frame.

The best example of that right now is Bed Bath & Beyond (BBBY), a retailer that's struggling mightily. Sales are falling, the company is shutting down stores, and there's concern that it may go into bankruptcy. However, that hasn't stopped the meme stock from jumping this month as investors have been betting on its rise in value despite its challenges.

This short-term outlook is dangerous because, while it may lead to quick profits, it can also cause significant losses due to high volatility in these types of stocks. The safer strategy is to buy stocks for the long term.

Long-term investing: Fundamentals and growth

A good example of a sound long-term investment is Johnson & Johnson (JNJ -1.15%). The healthcare giant consistently earns strong profits, has paid a dividend (and increased it for decades), and has risen over 140% over the past 10 years. Although that's a bit lower than the S&P 500's increase of 172% over the same time frame, the healthcare stock has also been less volatile during that time. Investors may be willing to forgo some upside in return for stability.

Johnson & Johnson, while stable, isn't a business that's standing pat either. It's spinning off its consumer business this year and pivoting more toward its medical device and pharmaceutical segments, where it sees more growth potential. Last year, it acquired heart-pump maker Abiomed for $16.6 billion in an effort to bolster its medical-device portfolio.

This mix of stability and growth is what can make Johnson & Johnson an attractive investment to buy for the long haul. While Bed Bath & Beyond has outperformed the healthcare stock over the past month, it's not a trend that investors should count on continuing over the long term.

Index funds can offer a good alternative

If you're not sure which stock to invest in, then an index fund can be the best alternative. Buffett and many other prominent investors, including Burton Malkiel, author of A Random Walk Down Wall Street, suggest investing in index funds. This offers investors a way to benefit from the stock market's overall success without picking individual stocks.

One example is the Schwab S&P 500 Index Fund. It tracks the S&P 500, and has a minuscule expense ratio of just 0.02%. You can pile your money into that type of investment, knowing that the risk is minimal in the long term and fees aren't going to take a significant chunk out of your overall returns.

Whether investing in a fund or an individual stock, investors are better off looking at the bigger picture and focusing on the long term, not trying to find quick wins or profits.