That answer will partly depend upon how long and at what dosage you've been taking it. However, you can kind of figure it out anyway through the drug's average published half-life. for xanax it's about 11 hours.
This means simply that if you took one 2 mg xanax, in 11 hours there would be 1 mg in your bloodstream. in another 11 hours, there would be .5 mg.
Complete elimination generally requires about 5-7 half lives. But that kind of also depends on the mg.
If you're worried about a drug or piss test, xanax is almost never included in a standard test.
Click Here to search for a treatment center in your state that is right for you.