Allow me to jump in here. Hi everyone. As mentioned above¹ my original intent was that Phil would live for longer than a single lifetime. That was the point of the original script: to see how a person might change if he lived longer than one lifetime (it was always about a man who could not escape life). The studio felt that the loop shouldn't last longer than two weeks. They were afraid the audience would freak out if it lasted any longer. Because my bookcase calendar (also mentioned above¹) was a specific record of passing time, Harold chose to remove it from the script, and in that way he could tell the studio it lasted two weeks or whatever and nobody could point to anything in the script that contradicted that. This explains why the length of Phil's incarceration strikes so many as a mystery: it was designed to be a mystery. Still, the sensibility of the characters as they progressed I think required a guiding clock, and Harold provided that. His sense was that it lasted about ten years, and I think the movie reflects that sensibility.

Still, I think it's fun the way people keep guessing and counting and arguing. My answer shouldn't discourage that pursuit. Who ever said that I know what I'm talking about, anyhow?

¹ Edit: Danny Rubin, the screenwriter for Groundhog Day, left two other answers which were deleted. In the above text he refers on these. Here is what they said: