How to build a habit: how long it takes and what the research says
A new habit takes about two months to feel automatic, often longer. Start small, tie it to a cue, keep it easy, track it, and don't panic over one miss.

A new daily habit takes about two months to become automatic, and often longer. In the study most people quote, volunteers who repeated one simple action every day took a median of 66 days to reach the point where it ran on its own, and individuals ranged from 18 to 254 days. What gets you there is repetition in the same setting: pick a very small action, tie it to something you already do every day, keep the same time and place, make it easy, track it, and don't treat one missed day as failure.
How long does it take to form a habit?
The popular figure of 21 days doesn't come from a study of habits. It traces back to Psycho-Cybernetics, a self-help book by Maxwell Maltz.
The study behind the real number was published in 2010 by Phillippa Lally and colleagues in the European Journal of Social Psychology. Ninety-six volunteers chose an eating, drinking or exercise behavior and did it every day in the same context, such as "after breakfast", for 12 weeks. Each day they rated how automatic it felt. Automaticity rose quickly at first, then leveled off. Among the people whose progress the researchers could model, the median time to reach that plateau was 66 days, with a range of 18 to 254 days.
A 2024 review in Healthcare pulled together 20 studies with 2,601 participants. In the few that measured time to habit directly, the medians were 59 to 66 days, and individual times ran from 4 to 335 days. The authors suggest planning for at least two to five months.
So the honest answer: expect about two months for a simple daily action, possibly much longer, and don't judge yourself against a date. Simpler actions get there faster.
What you're building
A habit is an action that a cue triggers automatically, because you've done it in that situation many times. That's why every step below is about the cue and the repetition rather than motivation. It's also why the early effort pays: once an action is a habit, it tends to keep going even after your motivation fades.
1. Start smaller than feels useful
Pick an action so small that you can do it on your worst day: one glass of water with breakfast, two pages of a book, a five-minute walk, one line in a journal. Simple actions become automatic sooner, and a tiny version you do every day gives you far more repetitions than a big one you keep putting off.
Once it runs on its own, you can grow it. If your habit is exercise and you've been inactive for a long time or have a health condition, check with your doctor before you start.
2. Tie it to a cue you already have
Choose a moment that already happens every day and attach the new action to it. Psychologists call this an implementation intention: a plan that says when, where and how, in the form "if this happens, then do that". In a 2006 meta-analysis of 94 tests, Peter Gollwitzer and Paschal Sheeran found that making these plans had a medium-to-large effect on whether people reached their goals.
Write yours down as one sentence: "When the morning coffee is poured, open the notebook and write three lines." In the 2024 review, one study found that a clock-time cue worked about as well as a cue from an existing routine, so pick whichever you hit most reliably.
3. Keep the same time and place
Habits form through repetition in a stable context. In Lally's study, people who did the behavior more consistently followed the habit curve more closely, and the 2024 review found that people who kept to a stable pattern in a consistent context built stronger habits.
Time of day may matter too. One study in the review found that a morning stretching routine became automatic faster than an evening one, at an average of 106 days against 154. It's a single study, so treat it as a hint. The time you can actually keep matters more than the time on paper.
4. Make it easy, and the alternative harder
Small amounts of effort change what people do. In a set of food studies, making a dish about 10 inches harder to reach, or swapping its serving spoon for tongs, reduced how much of it people ate by 8 to 16%.
Use that in your favor. Put the running shoes by the door, the book on your pillow, the filled water bottle on your desk. Then add a step to whatever competes with the new habit: charge the phone in another room, put the snacks on a high shelf, log out of the app you open on autopilot.
5. Track it
A tick on a calendar is enough. A 2016 meta-analysis of 138 studies with 19,951 participants found that getting people to monitor their progress helped them reach their goals, and it helped more when progress was physically recorded or made public.

Keep the record simple: one mark for each day you did the action. The point is to see the chain, not to grade yourself.
6. Missing once doesn't break it
This is the finding people most need to hear. In Lally's study, missing one opportunity did not materially affect habit formation, and automaticity gains soon resumed after a single miss. What did hurt was missing many times: too many skipped days, even spread out, lowered how automatic the habit became.
So a missed day is not a reset. Do the action at the next cue and keep the chain going. A useful rule is to make sure one miss doesn't turn into two.
7. What to do after a bad week
A week off is a pause. Restart without ceremony:
- Start at the next cue. Don't wait for Monday or the first of the month.
- Shrink it. Go back to the smallest version for a few days, even if you'd grown it.
- Check the cue. Travel, illness, a new job or a new schedule can remove the moment your habit hung on. If it's gone, pick a new one and write a new if-then plan.
- Make it easier if it keeps slipping. A habit that slips week after week is often too big or tied to a cue that doesn't happen every day.
Further reading
Two popular books cover the same ground in more depth: Atomic Habits by James Clear (2018) and Tiny Habits by BJ Fogg (2020), who founded the Behavior Design Lab at Stanford.
Frequently asked questions
Does it take 21 days to form a habit?
No. The 21-day figure comes from a self-help book, not from research on habits. In the best-known study, the median was 66 days, and some people took far longer.
Does missing a day reset a habit?
No. Missing a single day did not materially affect habit formation in Lally's study. Many missed days do add up, so pick it back up at the next cue.
What's the best time of day to build a habit?
The time you can repeat every day. One study found that morning stretching became automatic faster than evening stretching, but keeping to the same time and place matters most.
How do you know a habit has formed?
When the cue starts the action without a decision: the coffee is poured and you're already reaching for the notebook. Researchers measure this by asking people how automatic the action feels, and it stops rising once the habit is set.
Start Streaks
Tiny nudges that keep your habits alive.
Psst is invite-only. Sign up with code STREAKS
Scan with your iPhone / Download Psst
Psst is invite-only. Sign up with code STREAKS
Sources
- How are habits formed: Modelling habit formation in the real world (Lally, van Jaarsveld, Potts and Wardle, European Journal of Social Psychology, 2010)
- Time to form a habit: a systematic review and meta-analysis of health behaviour habit formation and its determinants (Singh, Murphy, Maher and Smith, Healthcare, 2024)
- Making health habitual: the psychology of 'habit-formation' and general practice (Gardner, Lally and Wardle, British Journal of General Practice, 2012)
- Implementation intentions and goal achievement: a meta-analysis of effects and processes (Gollwitzer and Sheeran, Advances in Experimental Social Psychology, 2006)
- Nudge to nobesity I: Minor changes in accessibility decrease food intake (Rozin and colleagues, Judgment and Decision Making, 2011)
- Does monitoring goal progress promote goal attainment? A meta-analysis of the experimental evidence (Harkin and colleagues, Psychological Bulletin, 2016)
- How to form a habit (British Psychological Society Research Digest)
- Atomic Habits
- B. J. Fogg