About 20 years.
I started smoking around age 18 or 19 in college. I quit soon after my 39th birthday.
I had a number of short quits (the longest one being 44 days) over my past few years as a smoker. Finding this site and reading Allen Carr's book gave me the knowledge, strength and support to finally quit for good (something I didn't think I could do, even during those short quits I just mentioned)