Investors know they shouldn't let emotions or impulses drive their investing choices, but many just can't help themselves, according to a survey from personal finance website Magnify Money.

A majority, or 58%, of investor respondents agreed their portfolio performs better when emotions are left out of the equation. Yet 47% said it was difficult to keep emotions at bay, the survey found.

The result is buying, or selling, remorse: Two-thirds of the respondents reported regretting impulsive or emotionally charged investment decisions. Those most likely to make those regretful moves are Gen Zers (85%) and millennials (73%).

Because they have less experience in the market, younger investors may not know how to make decisions, said Kamaron McNair, MagnifyMoney editorial assistant.

More from Invest in You:
Getting financial advice on social media can be tricky. How to navigate it
New investors are jumping into the market during the post-pandemic boom
Here's how to get a handle on your financial stress

On top of that, it's easier now to get into the stock market due to the different trading apps available. Combine that with the rise in social media investing advice, and it could be a recipe for disaster.

"The environment has made it easier for them to make the mistakes," McNair said.

"You see one TikTok to buy this stock, and people listen," she said. "They don't do background research on who is giving this advice."

It's not just emotions interfering with decision-making, it's alcohol. Almost a third, or 32%, of investors have invested while drunk. A whopping 59% of Gen Zers surveyed admitted to buying or selling an investment while inebriated.

What to do if your emotions rise

Before you beat yourself up, know that it is human nature to be emotional — and trying to block your emotions is futile, said Jacquette M. Timmons, financial behaviorist at New York-based Sterling Investment Management.

"Instead of trying to deny the existence of the emotion or suppress it, be honest with yourself about what that emotion that has bubbled up to the surface [is]," she said.

Once you acknowledge it, whether it is fear, greed or something else, figure out why you are feeling this way. Then work out the next action to take based on a system you should already have in place, which addresses the companies you want to buy, how you evaluate them and when to sell or buy.

"Far too many people are just measuring whether they should buy or sell something just based on the movement of the stock prices that has nothing to do necessarily with the performance of the company," Timmons said.

Instead, look beyond the daily stock price or quarterly movement to determine when you are going to sell, she said.

While people can't escape being emotional, they can choose whether or not to be impulsive, she noted.

In addition to going back to your system when faced with the desire to make an impulsive decision, also take a look at the overall impulsiveness in your life. See what the triggers were for that emotion to help you identify patterns and allow you to put up some barriers.

It's also important to know whether you are investing, which means holding assets to accumulate wealth for the long term, or trading, which involves frequent buying and selling.

"Part of the challenge is people are playing the market and they are not sure what their role is," Timmons said.

"That is why they are making these impulsive decisions."

SIGN UP: Money 101 is an 8-week learning course to financial freedom, delivered weekly to your inbox.

CHECK OUT: Nearly half of Americans selling their homes don't plan to buy another: Here's what they're doing instead via Grow with Acorns+CNBC

Disclosure: NBCUniversal and Comcast Ventures are investors in Acorns.