You will have seen the number. Twenty-one days, if the article is old; 66 days, if it is newer and wants to sound scientific. Both get quoted as if there were a fixed date after which flossing, a morning stretch or writing the next day's jobs list runs by itself. There isn't. But the study behind the 66 is worth reading properly, because what it actually found is more useful than the headline.
Where the 66 comes from
In 2010 Phillippa Lally and three colleagues at University College London published "How are habits formed: modelling habit formation in the real world" in the European Journal of Social Psychology. They recruited 96 volunteers, mostly postgraduate students with an average age of 27. Each person picked one new healthy behaviour to do once a day in the same situation, such as "after breakfast, eat a piece of fruit" or "before dinner, go for a 15-minute run". Every day for 84 days they logged whether they had done it and answered a short questionnaire about how automatic it felt: whether they did it without thinking, without having to remember, whether it would feel odd not to.
Automaticity rose fast at first and then levelled off, like a curve climbing to a plateau. The researchers fitted that curve for each person and asked: how many days until they reach 95% of their own plateau?
The answer people quote: a median of 66 days.
The range: 18 to 254 days.
Who it describes: 39 people. Of the 96, 82 sent enough data, and only 39 of those had a curve that fitted the model well. The 66 is the middle of that group.
Several of those figures are estimates beyond the data. The study lasted 84 days, so a 254-day answer is where the fitted curve was heading, not something anyone watched happen.
What it found that the headline drops
The behaviour mattered
Drinking a glass of water reached its plateau in a median of 59 days. Eating something (fruit at lunch, say) took 65. Exercise took 91, longer than the study itself. The differences were not statistically significant in so small a group, but they point the same way as later work: the simpler and smaller the action, the sooner it runs by itself.
Missing one day did not wreck it
This is the most useful finding in the paper and the least quoted. When a person skipped a day, their automaticity score dipped a little and then carried on climbing. One miss did not reset the count. What did hurt was doing it rarely: the people whose curves never fitted were mostly the ones who repeated the behaviour least often.
The rule is not "never miss". It is "never miss twice": one gap costs almost nothing, a run of gaps costs the habit.
Some people never got there
For about half the group, nothing like a habit curve showed up in 12 weeks. A habit is not guaranteed by repetition alone; the situation has to be the same, the action small enough to do on a bad day, and the cue clear.
What a study of 30,000 gym-goers added
In 2023 Anastasia Buyalskaya, Colin Camerer and colleagues published a much larger study in PNAS. They used machine learning on badge data from more than 30,000 members of a US gym chain over four years, and on hand-washing data from more than 3,000 hospital workers who wore badges that logged each visit to a sink.
Going to the gym took about six months on average to become predictable from context.
Washing hands on a hospital shift took a few weeks.
What predicted gym visits: for 76% of people, how long it had been since the last visit (the longer the gap, the less likely the next one), and for 69%, the day of the week. Time of day mattered little.
Different method, same message as Lally: there is no single number, short simple actions in a fixed setting come fastest, and long gaps hurt more than one missed day. A 2024 review by Singh and colleagues in Healthcare found only four studies that measured the time itself; their medians were 59 to 66 days and individual times ran from 4 to 335 days.
And the 21 days?
It is usually traced to the 1960 self-help book Psycho-Cybernetics by Maxwell Maltz, a plastic surgeon, who noticed that patients took about three weeks to get used to a changed face and wrote that it "usually requires a minimum of about 21 days" to change a mental image. It was an observation about getting used to something, not a measure of how long a new action takes to become automatic, and the "minimum" fell off as it was retold. No study of habit formation backs it.
Tie the new habit to a task you already do every day
Lally's volunteers had to name a cue from their existing day: after breakfast, when I get to work, before dinner. That is the part of the method worth stealing. A habit forms in a context, and the easiest context to borrow is something you already do at the same point every day without fail.
At work, the shift is the cue. Clocking in, opening the kitchen, unlocking the site gate, the end-of-day tidy. These already happen daily and at a fixed point.
Attach one small action to it. "After I clock in, I check today's list before I touch anything else." "After the last pan is washed, I write tomorrow's prep on the board." "When I lock the gate, I take one photo of the day's work."
Make it small enough for a bad day. If it takes more than two minutes on the worst shift of the week, cut it down. You can grow it once it runs by itself.
Make the cue visible. A repeating task on the list for that time of day is a reminder you don't have to remember. Once you tick it without needing the reminder, the habit is doing its job.
Expect two to three months, not three weeks. And longer for anything as big as exercise. If it still feels like effort at week four, you are on schedule, not failing.
If one day goes wrong, do the next one. If two in a row go, look at the cue: maybe the shift changed, maybe the action is too big. That is a fixable design problem, not a lack of willpower.
What the research does not show
There is no fixed number of days. 66 is the middle of 39 people's fitted curves. Your habit could take three weeks or most of a year.
Automaticity was self-reported. People rated how automatic it felt. That is a reasonable stand-in for a habit, but the authors themselves said better measures were needed.
The samples are narrow. Mostly students in one study, members of one gym chain and hospital staff in the other. Nobody has measured habits on restaurant or building-site shifts directly; the mechanism is plausible there, the numbers are not measured.
Feeling automatic is not the same as keeping it up. Habits can fade when the setting changes: a new job, a new rota, a new house.
It has not been replicated as such. A registered replication of Lally's design has been proposed but, as far as we could find, not yet published.
Putting it on your list
Pick one small action, write it as a task that repeats every day, and put it at the point in the day that triggers it: the start of the shift, the close. Tick it each day. The tick itself is a small reward (what it does in the brain is in dopamine and the tick), and a run of ticks is easy to see. If you are struggling to start at all, rather than to repeat, that is a different problem: see why you put things off.
Make the new habit a daily repeating task, tied to the start or end of your shift, and tick it every day.
Open tick-tock-doneSources
Lally, P., van Jaarsveld, C. H. M., Potts, H. W. W. & Wardle, J. (2010). How are habits formed: modelling habit formation in the real world. European Journal of Social Psychology 40(6), 998-1009. UCL news on the study
The Behavioral Scientist, "How long does it take to form a habit? What Lally et al. (2010) actually found" (participant counts, exclusions and medians by behaviour). Article
Buyalskaya, A., Ho, H., Milkman, K. L., Li, X., Duckworth, A. L. & Camerer, C. (2023). What can machine learning teach us about habit formation? Evidence from exercise and hygiene. PNAS 120(17). Paper · Caltech summary
Singh, B., Murphy, A., Maher, C. & Smith, A. E. (2024). Time to form a habit: a systematic review and meta-analysis of health behaviour habit formation and its determinants. Healthcare 12(23), 2488. Record
The Psychologist (British Psychological Society), "How to form a habit". Research digest
Maltz, M. (1960). Psycho-Cybernetics. Prentice-Hall.