The answer depends on your particular goals and whether you have previous knowledge or some sort of experience in playing a musical instrument. Then, there’s one’s personal learning speed that holds a great deal of importance, not to mention your motivation.
If you have no experience in playing the piano and you don’t aim very high, you can learn to play a short easy song in just a few minutes. However, things changed dramatically from a temporal point of view if you want to be able to go from 0 piano experience to playing advanced classical pieces.
In such cases, it might take somewhere between 10 to 15 years of daily practice and concentrated study. Many people target a medium-level, though. Even so, there are particular factors that can reduce or extend the time you need to achieve your goals.
The type of teacher you go for, the time you’re willing to dedicate to practicing, your motivation, and how diligently you are about the whole thing all count a lot when it comes to the time required to master the piano as you’d like to. Your individual learning pace holds great importance as well.