This is probably the most frequently asked question I get. It is also the hardest one to answer. I wish I had a crystal ball to answer this one, or better yet a magic wand so I could just wave it and turn us all into the guitarists we want to be. Since I do not have either one, here are a few thoughts on the subject.
First, how do you want to play guitar? Do you want to be able to strum a few chords and sing folk songs, or do you want to play like Van Halen or Steve Vai? Or maybe you want to play jazz guitar. How you want to play will be a factor in how long it takes.
It will take a lot longer to be a jazz guitarist or to solo like Vai or Van Halen than it will to play simple chord accompaniments to folk songs. There are many different styles and ways to play guitar, some more difficult than others. By clearly defining your guitar playing goals, you can get a better idea of how long it will take you to learn guitar.
You can learn to play a few chords and strumming patterns in a matter of weeks. To learn how to improvise and solo can take years. In fact, that is one of the joys of music, there is so much to learn that it is a never ending process of discovery.
Second, how much time are you willing to spend practicing? As far as I know, there are no shortcuts to learning the guitar. I see promises in ads like, “Learn To Play The Guitar In 3 Days.” In my experience, this is simply not possible. It takes practice to learn the guitar.
If you are only willing to commit to 10 or 15 minutes here or there, it is going to take you a lot longer to learn than someone who spends an hour every day practicing. Or two hours, or three…you get the idea. The more time you spend practicing the quicker you will learn.
Third, and this is one I cannot put my finger on (no pun intended.) Some people seem to have more of a natural aptitude for the guitar than others. They just seem to be able to pick it up easier than others. If you are one of the fortunate ones that seem to be blessed with this, good for you.
For the rest of us, hard work and practice will get us to our guitar playing goals. I really believe that anyone can learn to play. No matter how difficult it may seem at times, stay the course, practice, and you will improve.
This is the best answer I can give to your question. I am sure it is probably not what you were looking for but hopefully I have given you some insight and some things to think about. In summary, define your goal as a guitarist, and when you achieve that goal you may find yourself then setting a higher goal. Set aside a consistent block of time to practice. Daily repetition of your material will help you improve faster than anything I know.
Good luck!