I can't give an exact answer, but I can tell you that it happens gradually. Initially you feel great, and you're incredibly productive. Two months later you're taking the same amount, but it doesn't give you that same feeling so you increase the dose a little bit. This repeats for awhile until you start noticing side effects and try to stop. That's when you're stuck - you can't do the work you used to do unless you're medicated, and you can't stop without putting your life on hold for a very long time.
The thing to do is threshold dose, don't increase the dose, and take holidays for long enough to allow recalibration. It's simple if you understand the control system mechanisms at work.
By threshold dose I mean take no more than is needed to get an effect. I experimented a bit and found 50-100mg of modafinil (1/4 to 1/2 pill) to be effective and have never taken 200mg.
Escalation on tolerance is the exact opposite of what you want. On the first hint of tolerance, stop. Again think about the control system at work. Your body is trying to maintain homeostasis, which is usually a very good thing.