Xanax is a benzodiazepine that is typically prescribed for anxiety and panic disorders. It has a short half-life, so it wears off quickly. Most people find that it lasts for four to six hours.