"When should I sell?" That's one of the most popular investing questions. It's a lot harder to answer than "When should I buy?" We worry we'll sell too soon and leave potential profits on the table. We worry we'll sell too late, perhaps after a 20% pullback from an all-time high. We make decisions based on emotion -- for example, selling in a fit of pique following a bad earnings report.

I'm as guilty as the next guy of making selling mistakes. But I'm learning not to outsmart myself. My New Year's resolution for 2006 was to not sell a share of stock this year, and perhaps beyond.

Why on earth would I have done such a thing, you ask, and wouldn't it have been easier just to lose 10 pounds?

My sad tales of woe
I made my resolution because my selling decisions have cost me a lot of money. Here are three examples:

I used to own funeral-home operator Alderwoods Group (NASDAQ:AWGI). In its 2004 10-K, the company got a less-than-clean auditor's opinion, which is one of my immediate red flags. After a few days, it became apparent that the problem was related to new legislation (Sarbanes-Oxley) and not a big deal. But I'd already sold at $12 after buying seven months earlier for $9. A nice capital gain, and the tax man was happy to take a good chunk of my money. Today, the stock flirts with $20, after agreeing to be bought for that amount by Service Corp. International (NYSE:SCI). Ouch.

I had not one but two chances to hold UnitedHealth Group (NYSE:UNH). I'd owned two smaller, regional HMOs -- Oxford Health Plans and Mid-Atlantic Medical Systems -- that were acquired by UnitedHealth. I made 43% on my Mid-Atlantic sale and 14% on my Oxford sale. Wonderful, right?

Not so much. If I hadn't sold the UnitedHealth shares issued to me, I'd be sitting on further 70% and 50% gains, respectively, since the acquisitions. No commissions paid. No smiling tax man.

One more. Electronic medical record systems provider Quality Systems (NASDAQ:QSII) made me "four-bagger happy" over the two-plus years I owned it. The company's rise combined strong execution and growth with the market's willingness to pay a higher premium for that strength.

Midway through 2005, I became concerned with the company's valuation. I sold call options on the stock, trading the future upside of the stock price for some up-front cash. The risk was that the stock would continue to run, and I'd lose my shares for far less than the market price. Guess what happened? Even though Quality Systems is 14% off its high, it's still 34% higher than when I was forced to sell -- and I'm including the option premium I received.

Sell now!
You own shares in a nice little business. You've got a nice gain. You're hearing, "Don't be greedy! Don't you know pigs get slaughtered?"

Someone close to me was gifted Starbucks (NASDAQ:SBUX) shares in mid-1998. Less than a year later, she sold for a nice gain in the 30% range. Excellent! But the stock has been a five-bagger from her sale price. For those of you counting at home, that's a foregone 22% annual return -- and no taxes paid.

The Foolish bottom line
To be sure, there are often good reasons to sell: a loss of faith in management or a valuation that goes completely bonkers, to name two. On the valuation front, think Cisco Systems (NASDAQ:CSCO) in mid-2000, trading for 150 times free cash flow. A fundamental business change would be another reason to sell. Imagine what an age-reversing pill would do to Alderwoods. But ideally, we should see that coming long in advance.

This all leads me back to my resolution. I add new money every month to my portfolio, and now I'm going to make sure I hold my buys for a good, long time. After all, I won't buy a stock unless I'm very sure of its long-term prospects. There's no reason I shouldn't benefit from all those years for which I take the time to project the company's cash flows.

This long-term, buy-to-hold strategy is also what Tom Gardner and Bill Mann recommend to their Motley Fool Hidden Gems community members. Together, we're buying great companies we can hold long-term, and we're already beating the S&P 500 by nearly 19 percentage points.

Reasons to sell may come, but they are few and far between. Particularly when you have a portfolio of true jewels. Click here to learn more.

This article was originally published on March 16, 2006. Since then, Jim has broken his "no-selling" resolution only once, and it was only after carefully considering what he was giving up versus what he gained. That doesn't mean we shouldn't needle him about it, though.

Fool contributor Jim Gillies is part of the Hidden Gems team, searching out tomorrow's best small caps today. He does not own shares of any company mentioned (because, you know, he sold). UnitedHealth Group is an Inside Value and Stock Advisor pick. Starbucks and Quality Systems are Stock Advisor recommendations. Alderwoods Group is a Hidden Gems recommendation. Send Jimfeedback! The Fool has a disclosure policy.