The duration of phototherapy varies depending on the severity of jaundice and the baby's response to treatment. In many cases, treatment lasts between 1 to 2 days, but it can be longer if bilirubin levels are high or if the baby has underlying conditions that affect bilirubin metabolism.