Court-ordered rehab typically lasts anywhere from 30 days to six months or longer, depending on the offense, the severity of the addiction, and what a judge determines is appropriate. There is no single standard length. Most people end up in a program lasting 30 to 90 days, but the total time commitment, including aftercare and monitoring, often stretches well beyond the initial treatment phase.
Common Program Lengths
Court-mandated rehab programs generally fall into three tiers. Short-term programs run 30 to 90 days and are the most common for first-time or less severe offenses. These focus on detox, education, and building basic coping skills. Medium-term programs run 90 to 180 days and are designed for people with more significant addiction histories who need a deeper therapeutic approach, including relapse prevention work and skill-building. Long-term programs last 180 days or more and are reserved for severe addiction or cases involving co-occurring mental health conditions.
The specific number a judge orders depends heavily on the individual case. Under federal sentencing guidelines, courts can mandate substance abuse treatment as a condition of probation or supervised release, but the law is written to be flexible. The probation officer and treatment provider collaborate on a plan that sets the modality, intensity, and anticipated duration based on the person’s risk level and clinical needs. That means two people convicted of similar offenses can end up with very different treatment timelines.
DUI-Specific Timelines
DUI and DWI cases often come with their own mandated program structures that are more rigid than general court-ordered rehab. California’s system offers a useful example of how these escalate with repeat offenses:
- Wet reckless conviction: A 12-hour education program.
- First DUI (standard): A 3-month program totaling 30 hours of education and counseling.
- First DUI with high blood alcohol (0.20 or above): A 9-month, 60-hour program.
- Second DUI: An 18-month program including 52 hours of group counseling, 12 hours of education, and biweekly individual check-ins for the first year.
- Third or subsequent DUI: Up to 30 months, with 78 hours of group counseling, 12 hours of education, and 120 to 300 hours of community service.
Other states have their own structures, but the pattern is consistent: repeat offenses lead to significantly longer mandated treatment. A first-time DUI might mean a few months of outpatient sessions, while a third DUI can mean over two years of structured programming.
Inpatient vs. Outpatient: How Format Affects Duration
The type of program matters as much as the length. Residential (inpatient) treatment means living at a facility full-time, and these stays typically range from 30 to 90 days for court-ordered cases. Outpatient programs allow you to live at home and attend sessions several times per week, but they tend to run longer overall because the hours are spread out.
A common path for first-time cases is 8 to 12 weeks of intensive outpatient treatment followed by 3 to 6 months of aftercare. More complex cases often start with 30 to 90 days of residential treatment, step down to a partial hospitalization or intensive outpatient program, and then continue with extended aftercare. The total timeline for someone moving through all these phases can easily reach a year or more.
What Determines Your Specific Length
Several factors shape how long a court will require you to stay in treatment. The legal variables include the severity of your offense, whether it’s a first-time or repeat charge, and the specific statutes in your state. The clinical variables matter just as much: the substance involved, how long you’ve been using, and whether you have co-occurring mental health conditions like depression or anxiety.
Research from the Drug Abuse Treatment Outcome Study found that people who entered residential treatment under moderate to high legal pressure were significantly more likely to stay 90 days or more compared to those with low legal pressure. In other words, stronger court mandates tend to produce longer actual stays, which is by design. People with more extensive criminal histories, co-occurring psychological disorders, and more severe employment or education challenges are less likely to complete treatment, and judges may account for that by ordering longer or more intensive programs upfront.
The substance itself can also play a role. Studies have found that people with opioid dependence and those with cocaine use disorders face different completion rates, which can influence treatment planning and the court’s expectations for how long recovery support needs to last.
Aftercare Adds Months to the Timeline
The rehab stay itself is only one piece. Most court-ordered treatment includes a mandatory aftercare phase that extends 3 to 12 months beyond the initial program, and it often overlaps with probation or other legal monitoring. Aftercare typically involves monthly counseling sessions, peer support group attendance, sponsor contact, and sometimes ongoing drug testing. Standard aftercare averages 1 to 3 hours per week plus verified attendance at support meetings.
Courts track compliance through attendance logs and test results. So while someone might complete a 90-day residential program, their total obligation to the court could stretch to 12 or even 18 months when aftercare is included.
What Happens If You Don’t Complete the Program
Leaving court-ordered rehab early or failing drug tests during treatment carries serious legal consequences. Because rehab was ordered as an alternative to (or condition of) sentencing, noncompliance typically sends your case back before a judge. Depending on the original charge, this can mean jail or prison time, extended probation, a longer or more intensive treatment mandate, or revocation of a plea deal.
The legal pressure is actually one reason court-mandated treatment can be effective. Research consistently shows that people under legal pressure stay in treatment longer than those who enter voluntarily, and longer stays are associated with better outcomes. People with strong social support, higher confidence in their ability to stay sober, and genuine internal motivation tend to do best, but the external accountability of a court order helps bridge the gap during early recovery when motivation is lowest.

