Well, there is no one exact answer. I have hatched eggs sitting on a shelf in my cool basement that were two weeks old and most hatched. I have pulled an egg from the fridge that had been in there a week to put under a broody, not thinking it would hatch, sort of as a place holder, and it hatched.
Eggs begin to lose viability in proper temps, unrefrigerated, but at cool temps, after a week. After two weeks, viability drops dramatically. At three weeks, it's unlikely any will hatch. I would never purposefully store eggs in the fridge to hatch. They won't be viable in the fridge as long as they are on a counter in a cool location. If it's in hot weather times and you have no cool basement, you store them low to the ground in the coolest location in your house that you know of because cool air sinks.
On the flipside, one situation happened to me almost 7 years ago when I traded my breeding rooster for a freezer of venison. I had sold the eggs up until that point that he left and I figured I had viability for another two weeks on eggs I collected after he was gone. Well, it didn't happen. I got only one chick from all the eggs collected so it was a major goof-up. Fertility lasted on that batch only about a week for some unknown reason. It was not an incubation problem or a rooster problem (he was very young and virile, no issues with any other eggs hatching). This is why I say there is no one exact answer.