If you take xanax when there is currently none in your system, it can be cleared out in 1-3 days for a UA.
If you took a very large dose under those circumstances, it is more like 2-3 days.
If you take xanax everyday, it can take up to a week or more to clear your system for UA purposes.
I suggest doing a Google search. There was a website I used a while back for research, I forget the name of it, but it had very detailed reports of xanax use and UA results.