Buying great stocks is only the first step to building wealth, and it's probably the easiest part. Once you have solid companies in your portfolio, holding them for the long term can be challenging for investors. It's tempting to sell out of stocks after some early gains, but "locking in" your gains may shortchange your future wealth. Two Fool.com contributors, Brian Withers and Brian Feroldi, share their biggest investing mistakes on this Motley Fool Live episode, recorded on Jan. 17, and discuss how doing nothing is often the best course of action for investors.

Brian Withers: All right. Well, selling too soon can be hazardous to your returns, to your wealth. A little story about Netflix (NASDAQ:NFLX). I was an early buyer. I became a customer in 2004, 2005-ish time and you can see the prices that I bought Netflix at. Just unheard of at this point. Although, when I bought them, the stock had split since then, so it wasn't those prices that I bought it at. I bought a bunch, seven times there.

Also, during that process, it became the No. 1 holding in my portfolio at about 23%. That really freaked me out a little bit. I was still early in investing and as the stock ran up in 2009 and 2010 out of the financial crisis, it was really just taking off. The business was doing very, very well.

There'd be a certain dollar amount that I was like, if it goes above this, I'm going to sell some, and it went above that, and I sold some down to that dollar amount and then it went up again. So I did that for a little while, and then eventually, it was just like, I can't deal with this anymore. But prices that I got were tremendous. There was gains all along the way. Some were, I think close to even a 20-bagger along the way.

But you guys know what happened to Netflix since then. Just absolutely incredible run. This was a multi-million-dollar mistake. Had I even just kept a few shares, I would've been much much better off today.

Brian Feroldi: Started with a painful one right out of the gate, yeah?

Withers: Get that one out of the way.

Feroldi: Now let me ask this, Brian. Obviously, knowing what you know now, you would go back and put 100% of your portfolio in Netflix and make it the only stock that you own again and again and again.

Withers: Yeah. I don't know.

Feroldi: That's the wonderful thing about hindsight, right?

Withers: Yeah. Well, you can see even after I sold out, here was the Qwikster debacle, I missed that whole thing altogether. I can't imagine holding through that. Even some of these gyrations in here, Netflix has been a tough one to hold if you watch it [the stock price] too often.

Feroldi: Well, let me ask you this. So this was 23% of your portfolio in 2007?

Withers: Yeah.

Feroldi: Again, doing nothing was the right thing to do.

Withers: Yeah.

Feroldi: Wouldn't this be 99% of your portfolio now?

Withers: Yeah. These holdings, eclipsed my entire portfolio by at least double.

Feroldi: There you go.

Withers: Yeah.

Feroldi: I 100% agree with the lesson there, but there's also the risk balancing. We're looking at this with the benefit of hindsight and saying, obviously, you should have just held. When you're going through day-by-day, it's tricky. I'm going to revisit this lesson later. [laughs]

Withers: Yeah. I think the biggest thing for me, I totally get trimming a large position. I know if it climbed up to 50 and 75% of my portfolio, I never would've been able to hold that. But the fact that I sold out everything all together, I think that was really the waste in that one.

Feroldi: All right, well, Brian, bared with his soul about his worst investing decisions, here's mine, I bought American Tower at 60.

Withers: You sold it at 60.

Feroldi: Excuse me. Yes. I bought American Tower at like 20, 25, 30, and I think at a Motley Fool recommendation, it went to 60. Brian, it had a high price-to-earnings ratio, I was like, "Time to get out of this thing." Thesis done. And then it four-bagged.

The worst mistake I ever made is with Dexcom. With my previous job, I had a ton of exposure to Dexcom. I saw its product firsthand. I saw how fast that it was selling, and I bought a couple of shares, and then I sold them later that same year in a 20% profit. Oops, [laughs] because that has been a 50-bagger since selling.

I've made the same mistake with Microsoft. Microsoft is an eight-bagger from when I sold it. I mean, that's a remarkable thing to say. Microsoft, because that was like 2012, 2011 that I sold it. Something like that. Paychex, Insulet, and Waste Management.

Patience is your biggest edge.

Withers: Do you have Dexcom now?

Feroldi: I don't.

Withers: My sister recently bought some just because it's doing all sorts of pioneering stuff and still has plenty of runway.

Feroldi: Agreed. It's [laughs] interesting, it's the super fast-growing company. To me, Dexcom is my example of when expertise can be [a] bad thing. Because I know all of the reasons that I know Dexcom's competition so well and I know all of the reasons that it shouldn't work, that I've never been interested in rebuying, and I should have. Because of my expertise in diabetes, I also missed Livongo.

Withers: Wow.

Feroldi: I listened to some industry insiders who are like, this is like snake oil salesman, this business model has been tried. It doesn't work. Livongo was an eight-bagger in seven months, something like that. That's where expertise can work around you.

But the key point here is, your biggest edge as an individual investor is patience. It's a massive edge that you have over the rest of other investors. You are not beholden it to anybody else, so you do not have to buy or sell on any given time frame other than your own. Patience is your biggest edge. If you found a high-quality company, just own it.

Withers: There you go. Be patient not to lock in gains or even just sell that and move on to something else, right?

Feroldi: That's right.