There is no "Right" answer, it is going to depend on a lot of variables primarily to do with your initial yeast pitch, its size, vitality, average age of the yeast cells, aeration... and to no small extent wort quality (is it a good place for yeast to live).
The next big variable is fermenting temperature, all chemical (and biochemical) reactions happen faster hotter, that includes ones we want and ones we don't.
Any technical book on brewing is going to tell you that 14 days is the maximum, but then which yeast are we talking about.
There is the oldest yeast that was pitched first (if you have been following the rehydration thread, half of what you add could be dead from the get go).
Next there is a significant fraction of the yeast that won't change from vegetative to alcohol producing stage of its life cycle (the change from aerobic to anaerobic) and settles out and starts to age.
Third is the yeast that settles out when the ferment is finished.
Lastly the very small that is still in suspension at packaging, beer that looks clear can still have 10,000 cells/mL, more than enough for conditioning, but not really enough to cause problems, as it will do into a long term survival spore form as conditions change.
I know racking is largely out of fashion on AHB, if you rack I think you could start counting days from then.
The rule of thumb I use, if the ferment isn't over in 7 days you under pitched, that leaves another week for the yeast to settle.
Any longer and I would be racking, if I wanted to crop the yeast I would be racking, if I wanted to dry hop or Oak or any thing that took longer than 14 days I would rack.
The above is all talking about Ale brewing.
The following is from Kunze and shows a temp/time profile most similar to what a home brewer will be doing, the Arrows along the bottom is when yeast/trub is drawn off.
Mark