how many years will it take to master chess?


Maybe in your lifetime but everyone is different and learns at different paces.
And maybe you'll learn things faster than most, but four hours a week isn't very much.
4 h / week is OK if done efficiently
Select 2 days / week with 2 h / session:
1) Solve tactics puzzles as a warm-up
2) Play a 15|10 game
3) If you lost then analyse it, else analyse an annotated grandmaster game

Practice all you like, there is no guarantee you will attain a master rating.
But, without practice, you are even less likely to attain it. Study & Play (at slower time limits) until you can start setting up the tactical shots or seeing the path to the won endgame. If this doesn't happen, you will have reached a plateau and will likely go no further.



A simple comparison.
On January 1, 2010, at the age of 19 years and 32 days old, Magnus Carlsen became the youngest person to take the top of the world rankings. He was born on nov 30, 1990.
Remember also that he started playing chess when he was still a child, athe age of 8 years old.

Calculus is not hard, but being a maths professor is. I don't think anyone could do that.

He said "anyone can do that" so I'm saying no.
I know "I don't think anyone can" sounds like saying 100% of people can't, but that's not what it means in this case.

If you increase your study/practice time to a few hours each day, you'll still be looking at 5 to 10 years (or more) to reach a master's level of play.
And that's assuming you study thoroughly, and practice diligently - which most players tend not to do ...
A lot of players think they study and practice well, but if they saw the amount of time and work that actual titled players devote to chess, they'd likely be stunned.