Why there is no single number
The honest answer to βhow long does it take to build a habitβ is a range, and the width of that range is the finding. When Phillippa Lally and colleagues followed 96 people forming a new daily habit, the median time to automaticity was 66 days β but individuals ranged from 18 days to 254. That is a fourteen-fold difference between the fastest and slowest person in the same study.
What separated them was mostly the behaviour, not the person. Drinking a glass of water after breakfast became automatic quickly. Doing 50 sit-ups before dinner took far longer. If you have failed to build a habit in three weeks, the most likely explanation is that three weeks was never the right target for that behaviour.
Where the 21-day rule came from
The 21-day figure is not a research finding. It traces to Psycho-Cybernetics (1960), in which the plastic surgeon Maxwell Maltz noted that his patients seemed to take about 21 days to adjust to an altered appearance β an observation about adapting to a changed self-image, not about forming a habit. Repeated for six decades, it hardened into a rule that the actual measurements later contradicted by a factor of three.
The practical cost of believing it is real: people conclude at day 22 that the habit βdid not takeβ and stop, at roughly the point the research says they were a third of the way there.
What actually shortens it
Repetition in a consistent context is the mechanism. A habit forms when a stable cue starts doing the work that deliberate decision-making was doing β which is why attaching a new behaviour to an existing, unmissable one tends to beat scheduling it by clock time. After the kettle goes on. Before the laptop opens. The cue fires whether or not you feel motivated, and motivation is exactly what is unreliable on day nine.
The other lever is size. A behaviour small enough to survive your worst day accumulates repetitions on the days that matter most β the bad ones β and repetitions are the currency the estimate above is denominated in. How to stack a habit onto one you already keep β
Missing a day is not the failure
In the same study, an occasional missed day had no measurable effect on how automatic the behaviour eventually became. This is worth stating plainly because the opposite belief is so widespread and so costly: people treat one lapse as proof the attempt has failed, and the stopping β not the lapse β is what ends the habit. Work out what to do after a broken streak β