According to Simon Gallagher from WhatCulture, Phil relives the same day approximately 12,400 times in Groundhog Day. To get to this number, Gallagher began counting each separate day shown onscreen in Groundhog Day, which adds up to 38 days total. Next, he calculated all the different events that Phil mentions having happened, like his six offscreen suicide attempts (factoring in an additional 20 days to contemplate), assuming they all took place on separate days. Phil also says he saw the same film 100 times, presumably on different days, which brings the running total up to 164 days.
Gallagher also estimated how many days it would've taken Phil to learn and memorize the vast information about Rita (Andie MacDowell) and the diner folks' backstories and familiarize himself with certain places around town. Adding the two days Phil spent memorizing the answers to Jeopardy!, the total comes to around 272 days. Gallagher also gave Phil six weeks, or 42 days, to memorize the precise actions of the people driving the security van he eventually robs, and 26 days to learn how to fix Felix's back, which comes to 340 days.
Phil also indirectly reveals it took him six months to learn to card throw, which tacks on an additional 180 days, give or take, for a total of 520 days. For the skills that would take years to learn, Gallagher applied the theory that it takes 10,000 hours to master any one subject. He adjusted the numbers accordingly based on Phil's habits, assuming he focused on one skill at a time and none of the days overlapped:
10 years to become an expert at ice sculpting = 3650 days
10.5 years to master playing piano = 3833 days
12 years to become fluent in French = 4380 days
Learning these three skills took up the bulk of Phil's time, bringing the total to 12,383 days. Finally, Gallagher added 12 days for Phil to successfully accomplish his many selfless gestures, such as saving the child falling out of a tree and giving Buster the Heimlich maneuver. All in all, this comes to 12,395 days, which, rounded up to 12,400 days even, equals 33 years and 355 days, just 10 days short of 34 years. Of course, this total is only an estimate based heavily on assumption, but it seems like a pretty plausible (and horrifying) amount of time.