How Long Does It Take to Build a Habit?
It takes about two months for most new habits to feel automatic, not 21 days. The best-known study, from University College London, found a median of 66 days, and a 2024 review of 20 studies found medians of 59 to 66 days. The range is wide: from a few days for simple habits to six months or more for hard ones like going to the gym.
By Blane Steckline. Published: May 10, 2026. Updated: November 19, 2026.
Where the 21-day myth came from
The 21-day rule traces back to a 1960 self-help book called Psycho-Cybernetics by plastic surgeon Maxwell Maltz. He noticed his patients took about three weeks to adjust to changes in their appearance and extrapolated that all behavioral change followed the same timeline.
It was an observation, not a study. The number got repeated so often that it stuck. Decades of self-help books cite it without ever pointing to actual research.
What the research says
The most-cited study on habit formation comes from Phillippa Lally and colleagues at University College London. Published in the European Journal of Social Psychology, the study tracked 96 people forming a new daily habit (eating fruit with lunch, drinking water, going for a run) and measured when each behavior became automatic.
The study found a median of 66 days. The full range went from 18 days on the fast end to 254 days on the slow end. Some habits never became fully automatic during the 12-week study window.
About the study
Full citation: 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.
You will see this paper cited as both “Lally 2009” and “Lally 2010.” Both are correct and both mean the same study. It first appeared online in July 2009, and the print issue followed in 2010, so the online-first date gave it the “2009” label that stuck in popular coverage.
The research ran at University College London. 96 volunteers each picked one new eating, drinking or activity habit to repeat daily in the same context, then filled out a self-report every day for 12 weeks. Automaticity was measured daily with the Self-Report Habit Index, and 82 of the 96 provided enough data to analyze. Time to automaticity was estimated by fitting a curve to each person's data. Among participants whose data fit the model well, the estimates ranged from 18 to 254 days, with a median of 66. The 254-day end is an extrapolation, since the study itself only ran 12 weeks. Missing a single day did not measurably hurt habit formation.
| Key number | Finding |
|---|---|
| Median time to automaticity | 66 days (often quoted as the average) |
| Full range | 18 to 254 days (modeled estimates; the top end extrapolates past the study window) |
| Participants | 96 volunteers (82 provided enough data to analyze) |
| Study length | 12 weeks of daily self-reports |
| Journal | European Journal of Social Psychology, 40(6), 998–1009 |
| Missing one day | No measurable effect on habit formation |
What newer research says
Two larger studies have come out since Lally's, and both back up the same rough answer: about two months for most habits, with a lot of spread.
In 2024, a team of Australian researchers pulled together 20 studies with 2,601 people building habits like flossing, drinking water, eating better and exercising. The studies that measured time to habit found medians of 59 to 66 days and averages of 106 to 154 days. The averages run higher because a few people took far longer. The fastest took 4 days and the slowest 335.
A 2023 study in PNAS used machine learning on real behavior instead of surveys: more than 30,000 gym members over four years, and more than 3,000 hospital workers washing their hands. Handwashing at work became a habit in a few weeks. Going to the gym took about six months.
| Study | Who | Time to habit |
|---|---|---|
| Lally et al., 2009 | 96 volunteers, one daily habit each | Median 66 days (range 18 to 254) |
| Buyalskaya et al., 2023 | 30,000+ gym members, 3,000+ hospital workers | Gym about 6 months, handwashing a few weeks |
| Singh et al., 2024 review | 20 studies, 2,601 people | Medians 59 to 66 days (range 4 to 335) |
About these studies
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. Only four of the 20 studies reported a time to habit, and the authors rated most studies at high risk of bias, so treat the numbers as a rough guide.
Buyalskaya, A., et al. (2023). What can machine learning teach us about habit formation? Evidence from exercise and hygiene. Proceedings of the National Academy of Sciences. The six-month gym figure is an average from the model. Some people got there in about four months, others closer to seven.
Why the range is so wide
Four things explain the spread:
- Habit difficulty. Drinking a glass of water in the morning becomes automatic faster than doing 50 sit-ups. The harder the action, the more reps it takes.
- Context stability. Habits anchored to a stable cue (right after I brush my teeth, right when I sit down for lunch) form faster than habits with shifting contexts.
- Choice and enjoyment. In the 2024 review, habits people picked for themselves and habits they enjoyed grew stronger. Morning habits also did better, though the gym study found time of day made little difference for workouts.
- Individual variation.The same habit can take one person a month and another person six. Every study found this kind of spread, and it's normal.
The Lally study also found that missing a single day did not measurably hurt habit formation. So if you skip a Tuesday, just pick back up on Wednesday. You don't need a perfect record to build the habit. That's the idea behind the never miss twice rule.
What this means for your habit tracking
If habits take roughly two to three months to feel automatic, it helps to be able to see those months. One missed day does not erase the repetition you have already put in, but a streak counter that resets to zero treats it as if it does. A monthly grid you can scroll back through shows what really happened: most days filled in and a few gaps here and there.
That's why Keizoku uses a notebook-style monthly grid instead of a streak counter. You can see a whole month at a glance and look back through earlier months to see the longer pattern.
Tips for the long haul
- Plan for 90 days, not 21. Pick a habit you actually want to keep for that long.
- Anchor to an existing routine. Stable cues form habits faster. A habit stack gives the new habit a fixed spot in your day.
- Stick to the same days. In the gym study, most regulars went on the same days each week, and the longer since their last visit, the less likely they were to go back.
- Commit to the whole stretch. Two months is a long time to run on willpower. Some people write a habit contract with a start date and someone to check in with.
- Expect a slump in the middle. In my experience the novelty wears off around weeks 3 to 5, well before the habit feels automatic. That stretch is the hardest part, so plan for it.
- Miss a day, resume the next. The research says one missed day doesn't reset your progress.
- Track for at least three months before judging. If a habit still feels like a grind after three months, think about swapping it for a different one instead of blaming your willpower.
Frequently asked questions
How long does it take to form a habit?
About two months for most people. A 2024 review of 20 studies with 2,601 people found median times of 59 to 66 days, and the best-known study, from University College London, found a median of 66 days. Simple habits can take a few weeks and hard ones can take most of a year, so plan for two to three months, not three weeks.
Is the 21-day habit rule true?
No. The 21-day figure comes from a 1960 self-help book, Psycho-Cybernetics, based on how long plastic surgery patients took to adjust to their appearance. It was never a study of habit formation. Studies since then point to about two months for most habits.
How many weeks does it take to build a habit?
Roughly 8 to 10 weeks, based on median times of 59 to 66 days. Some habits form faster and hard ones take much longer, so planning for about 12 weeks of steady repetition is a reasonable buffer.
How long does it take to make going to the gym a habit?
Longer than most habits. A 2023 study of more than 30,000 gym members found going to the gym took about six months to become a habit, while handwashing at work took a few weeks. Hard, effortful habits sit at the slow end of the range.
What did the Lally 2009 habit study find?
The study, published online in 2009 and in print in 2010, tracked 96 people at University College London as each formed one new daily habit over 12 weeks. It found a median of 66 days to reach peak automaticity and a range of 18 to 254 days. Missing a single day did not measurably hurt habit formation.
About the author
Blane Steckline is the creator of Keizoku, a habit-tracking app built on the idea that a simple tool helps you stay consistent better than an overcomplicated app that takes time and attention away from the habits themselves.
Keizoku is a free habit tracker for iOS and Android. It uses a notebook-style grid, so you can look back over months of progress. Setup takes about two minutes and a missed day just leaves an empty box.