Many companies featured on Money advertise with us. Opinions are our own, but compensation and
in-depth research may determine where and how companies appear. Learn more about how we make money.

Money is not a client of any investment adviser featured on this page. The information provided on this page is for educational purposes only and is not intended as investment advice. Money does not offer advisory services.

Alamy

This is the time of the year when many of us pay serious attention to taxes. In some cases, way too much attention.

I can tell you from my personal experience.

Case in point: one of the biggest investing mistakes you can make is to avoid selling a security in which you have a big profit because you don’t want to fork over part of your gain to the IRS - and possibly to state and local governments as well.

No, I’m not talking about holding a security for a brief additional period in order to qualify for long-term capital gains treatment, which you get only on securities that you have owned for at least a year.

Given that the top federal tax on long-term cap gains is 23.8%, compared with more than 40% on short-term gains, waiting to liquidate an investment until the gain goes long term can make sense.

But, I’m talking about something totally foolish; something like what I did last May.

That’s when a deal was announced for the one master limited partnership that I own. Williams Partners LP would be, the announcement said, acquired in a deal in which WPZ holders would get common stock in return for their partnership units.

That would have triggered a substantial tax for me. Why? Because one of the joys of owning partnership units - back when they produced joyous results - is that a good hunk of the generous cash distributions they pay isn’t taxable.

Instead of counting as income, most of the distributions - please note they’re not dividends, they’re distributions - end up reducing your “tax basis.” That’s the cost of your investment for tax purposes, which in this case has little or no connection with what you paid for your units.

The unveiling of this deal ran up the price of my WPZ units to the high 50s from the high 40s. I decided not to sell, which would have triggered an immediate tax. Instead, I put off the day of tax reckoning.

Well, I ended up solving my paying-tax-on-profits problem by watching WPZ’s price fall by about two-thirds since I decided not to sell last spring. In other words: I solved most (or perhaps all) of my tax problem by watching most (or perhaps all) of my profit disappear.

I have been saving and investing for more than 40 years. But deciding to hold onto WPZ to avoid paying a big capital gains tax has got to be one of the stupidest things I’ve ever done.

Sure, you should take taxes into account when deciding whether to sell something on which you have a substantial profit. But make the taxes an incidental factor, not the main factor. That’s advice that I have both given - and received - over the years.

Read next: 12 Great Stocks for 2016

Too bad for me that I didn’t listen to it. I hope that you do.