It depends on what opioid you're dependent on and how much you take of said opioid for one.
As for the rest, unless you have a very heavy habit, please do not do what the person above me said, those doses are way too high, it's a waste really.
2-4mg should be enough to hold most habits, 8mg MAX. And by that, I mean first dose, then maybe again the 2nd day, the go down 1mg every day
until you're down to 2mg, then do that a few days, then 1mg a few days, then 0.5mg a few days, then 0.25mg a few days, then skip a day, then 0.25, then skip a day
then 0.1mg for 2 days, then do that every other day for maybe a week, and then try to stop entirely. That should work very well and you shouldn't have any real withdrawals that way unless you've been using a long time.