How long does it take to do teshuvah? Just a moment. Just a second before, he was a terrible rasha, and now he is a perfect tzaddik.
A primary proof is from the following Gemara (Kiddushin 49:). A total rasha gives a ring to a woman and tells her מקודשת את הרי לי, "You are married to me," and he adds על גמור צדיק שאני מנת, that the marriage is valid, solely if I am a perfect tzaddik. The Gemara says that they are married because, "Perhaps he had a thought of teshuvah." So, we see that a great rasha has the potential to become a tzaddik in a moment.
Here are some other sources:
The Gemara (Avodah Zarah 17.) tells the story of a grave sinner, Elazar ben Durdiya, who did teshuvah one day, and moments afterwards, he was niftar. The Gemara says that on the day he was inspired to do teshuvah, he sat between mountains and asked the mountains to daven for him. The mountains replied, "Before we daven for you, we must daven for ourselves, as it states (Yeshayah 54:10) תמוטינה והגבעות ימושו ההרים כי, 'For the mountains shall tilt and the hills totter.'" Elazar said, "Sun and moon, daven for me." The sun and moon also declined, saying, "Before we daven for you, we have to pray for ourselves, as it states (Yeshayah 24:23) החמה ובושה הלבנה וחפרה, 'The moon shall be ashamed, and the sun shall be abashed.'" Elazar said, "Stars daven for me. Ask Hashem to have compassion on me!" The stars replied, "Before we daven for you, we need to daven for ourselves, as it states (Yeshayah 34:4) השמים צבא כל ונמקו, 'All the host of heaven shall melt."
Realizing he had no one to turn to, Elazar ben Durdiya said, בי אלא תלוי הדבר אין, "The matter is left for me alone." He placed his head between his knees and cried until his soul left him. A bas kol emerged and proclaimed, "Reb Elazar ben Durdiya has now been readied for the life of Olam HaBa."
The Rebbe said, "It is not only that baalei teshuvah are accepted, but they are even called by the title 'Rebbe.'" (The bas kol called him Reb Elazar ben Durdiya. He acquired the title Rebbe because he did teshuvah.)
We also learn from this story that one can do teshuvah in one moment. It takes just a second, and everything can be turned around. Elazar ben Durdiya was a grave sinner, but at a moment of inspiration, he did teshuvah, acquired Olam HaBa, and was even called Rebbe.
The Gemara (Kiddushin 40:) states, "If a person was a rasha his entire life and he did teshuvah at the end of his life, his past bad deeds won't be mentioned anymore."
The Rambam (Hilchos Teshuvah 2:2) states, "What is teshuvah? It is to leave the sin, to remove it from his thoughts, and to be determined never to commit this sin again." Teshuvah is a decision never to sin again. This is the essence of teshuvah, and such a decision can be made in a moment.
22. A bachur once stared at Reb Yitzchak Meir of Zinkov zt'l, and Reb Yitzchak Meir asked him, "Why are you looking at me?" The bachur replied, "It's brought down in sefarim that it is a great inyan to look at tzaddikim. It purifies the soul." The Rebbe replied, "It is also written (Yeshayah 60:21), צדיקים כולם ועמך, all Yidden are tzaddikim. I think it would be more beneficial for you to look at yourself [to see where you can improve]."
23. Tosfos explains that the mountains didn't actually speak, but Elazar ben Durdiya understood that if the mountains could speak, that is what they would say. Tosfos brings another explanation that it was the malach in charge of the mountains that spoke to him.
24. The Tzemach Tzedek of Lubavitz zy'a asked: Why do people buy fast horses? I understand the benefit of a fast horse when one is headed in the right direction because he will reach his destination quicker. But sometimes, the horse runs in the wrong direction, and a fast horse will get you to the wrong place quicker. The answer is: A fast horse will also bring you back swiftly to your destination. Even if you stray very far, you can return quickly.