Thank you for your question and welcome to AnxietyConnection.com.
I am not a medical professional and would not be able to give you medical advice. However, according to a site called HomeDrugTestingKit, this type of medication will stay in your system up to 10 days. Because everyone metabolizes medication at a different rate, there is no exact time medication will leave your system.
If you have a prescription for this medication, you should bring the prescription with you when taking the test. However, based on the type of drug test you are having completed, the Xanax may or may not show up. This would depend on what substances are being looked for.
5-7 days my friend