Xanax is a doctor-prescribed medication belonging to the category of tranquilizers, primarily prescribed to treat panic attacks and certain types of sleep problems. Typical dosage depend significantly based on the individual's xanax 2mg situation, body mass, and reaction to the drug , and should invariably be decided by a licensed medical provider.