Zanax is a common mispelling for Xanax. How long Xanax, a drug used for anxiety, stays in your system varies based on multiple factors. The amount you took, your body size, and how well your body metabolizes it. It can stay somewhere between two days and two weeks. It can be detected in a drug test for about a week.