Depends on the person, circumstances, how much unresolved emotional conflict lies within the person.
I think every trip should be approached with the intention of self expansion, which by default would require some uncomfortable experiences so that you can self rectify mental/emotional patterns. If you go in with that intention the chance of a bad trip is minimal, with set and setting kept in mind.
to give you an idea.
I have probably done over 150 trips with various psychedelics. All used with the intention of consciousness expansion, and only ever had one 'bad trip'. I took 2 strong hits by myself in the middle of forest at night with no lights and meditated the for about 6hours straight. Safe to say i took a trip to the under world and had trouble integrating that experience aka, the meeting of my shadow self. It took me 6 weeks to recover from that experience and have been reluctant to take LSD since. But did half a tab a year later with no problems and plan to trip properly again soon (2 years since). I spent most of that 6 weeks in a completely erratic/restless state but came out a new person afterwards.
I also overdosed on a synthetic amphetamine which was supposed to be "lsd" and had 'flash backs' repeatedly for about 4 years. This wasn't exactly a 'bad trip' just a uncomfortable life changing experience. The flash backs where actually quite enjoyable.
From my experience, and from what ive seen in trippers around me, id say a few days or weeks for a level headed person, maybe 6 months for someone who easily gets lost in thought and emotions.
In any case if you take it in the right mind set and make sure the the set and settings right, you wont ever have a bad trip.