There is no simple or easy answer to that question. It all depends on the type of dough, its ingredients, and how the dough is made and managed. But, within that sweeping statement, the two factors that most govern the lifespan of the dough are yeast quantity and the temperature of the dough as it ferments. Other factors like the hydration of the dough and the amount of salt and sugar (if used) can also affect lifespan but if their values are within their normal ranges, they play a much lesser role.
I and other members have made dough that cold fermented for over twenty days and was usable. According to member November, researchers at North Dakota State University concluded that a yeast dough was usable up to about thirty days. Most people strive for a window of usability of about one to three days. To achieve that window, one would normally select an amount of yeast and control fermentation temperatures so that the dough is ready at the desired time. If too little yeast is used, the window of usability will increase. If too much yeast is used, the window will be shorter and the dough will be ready sooner than desired. It might even overferment and be unusable. There can be clues as to when a given dough has fermented too long, but the clues can differ from one dough to another. Most people look for excessive bubbling of the dough, particularly at the sides and bottom of the dough storage container, as signs of having gone too far. A ballooning of the dough by triple or more, especially if the dough shows signs of weakening and impending collapse, is another sign of the dough having gone too far. If a depression formed by a finger inserted into the dough remains after the finger is removed, that is also a fairly good sign that the dough is ready to be used.