With shares of Autodesk hovering near their 52-week highs, CNBC's feels like he owes investors an apology. "I'm always coming out here telling you that if you want to succeed as an investor, you need to have conviction and patience," the "Mad Money" host said Tuesday. "If you believe in a high-quality company, you should be prepared to stick with its stock even when the market turns against it for a brief period of time." But when Autodesk, the Cramer-fave software giant serving industries from engineering to entertainment, reported a quarterly miss last November, Cramer didn't stick with it. "The stock just absolutely got beaten around the head," he recalled. "I got nervous ... and I told you Autodesk needed to prove itself again. I said this had become a show-me stock. I warned you to be cautious." Now, Cramer realizes his earlier call "was just a huge mistake." Since he lost faith in Autodesk in December 2017, shares of the tech-meets-design play ran from $106 to $153, a 43 percent gain for investors who stayed with the stock. "I owe both you and the folks who run Autodesk an apology," the "Mad Money" host told investors.

Where did Cramer go wrong?

Until recently, Cramer was always clear on why he liked Autodesk's stock. The company sells pricey enterprise software, but professional architects, engineers, video game designers and others can't do without it. "These guys are so dominant in this business that you know what their No. 1 competitor is? Well, it isn't another company. It's just pirated versions of their own software," Cramer said Tuesday. So, in early 2017, Autodesk started the transition to a cloud-based, software-as-a-service model, charging clients hundreds of dollars a month for a subscription to their products rather than thousands of dollars for a one-time purchase. The effort, which used the more secure cloud to curb piracy, also helped attract small-business clients who were more inclined to pay for subscriptions over time. Cramer applauded Autodesk for the shift and recommended its stock at the time, but when shares of the software play pulled back, he didn't stick to his guns. Why? The "Mad Money" host balked at Autodesk's November earnings report, in which the company cut its full-year guidance and announced a restructuring plan in which it said it would lay off 13 percent of its workforce. "Typically, businesses don't unveil major restructurings when everything is going well," he said. "Long story short, I got spooked. I still believed in the long-term story, but I told you I had less conviction and I explicitly warned you against buying it into weakness as there could be more pain ahead." Autodesk's next earnings report in March didn't satisfy Cramer either due to weaker than expected subscription numbers. But Cramer admitted that line of thinking was misled, too. The lower new subscriber additions weren't actually a sign of weakness, he said, but a sign that more customers were choosing more expensive, company-wide subscriptions rather than purchasing individual products.

Lessons learned

Having seen marketing software colossus Adobe go through a similar transition, Cramer knew Autodesk's transformation would be a bumpy ride. On Tuesday, he kicked himself for not having conviction at the first sign of difficulty. "If I'd had real conviction, I would've seen the [December] sell-off in Autodesk as the buying opportunity it turned out to be," he told investors. He also regretted not giving the company credit where credit was due. "I called Autodesk, suddenly, a show-me stock, but when the company showed us that it's doing great, I didn't circle back to it," he said. "I had plenty of chances to correct myself." Since its latest earnings report in August, Autodesk's stock has come back with a vengeance, spiking 15 percent on news of the better than expected quarter. But the "Mad Money" host doesn't think investors have totally missed their chance. Shares of Autodesk are trading at 30 times the earnings estimates for 2021, which he called "pricey," but "not absurd." "Bottom line? When you find a fabulous long-term story like Autodesk ... and the company seems to hit a speed bump, don't be so quick to give up on it as I did," Cramer said. "I let the action in the stock of Autodesk discourage me and I ended up telling you not to take advantage of an amazing buying opportunity. Mea culpa," he told investors. "This is a great company that deserved the benefit of the doubt and I never should've lost conviction given how good the management team is. If you can get a bit of a pullback here, I'd be a buyer, but more important, shame on me for getting Autodesk so wrong."

WATCH: Cramer's mea culpa on Autodesk