It is the end of February. The gym is quieter than it was on January 6th, the new course is stuck at module 3, and the "two hours of deep work every morning" plan lasted until the first production incident. This is normal. In a classic study by John Norcross and colleagues, only 46% of New Year's resolvers were still continuously successful after six months. (Resolvers still did far better than people who wanted to change but made no resolution: 4%.) And resolutions can work: in a 2020 Swedish experiment with over 1,000 participants, 55% considered themselves successful after a year, and goals framed as approaching something ("start running") succeeded more often than goals framed as avoiding something ("stop eating sweets"): 58.9% vs. 47.1%.
The usual diagnosis is "not enough willpower". The research points somewhere else. Resolutions are goals, and goals depend on motivation, which is high in January and fades. Habits are different: they are behaviors that run on cues from your context, with little motivation or thought required. The question to ask in February is not "how do I get motivated again?" but "how do I move this behavior from effort to automaticity?"
This post covers what the research says about that process, how long it takes, which techniques have evidence, and how to apply them to deep work, learning and exercise.
1. What a habit is (and is not)
In psychology, a habit is not just something you do often. Habits are actions triggered automatically by contextual cues that have been associated with their performance: washing your hands after using the toilet, putting on a seatbelt after getting into the car. Repeat a behavior in the same context and the context starts to trigger the behavior on its own.
| Term | Meaning | Example |
|---|---|---|
| Goal | A desired outcome that needs conscious motivation | "Get fit this year" |
| Behavior | A specific action you can do or not do | "Run 20 minutes" |
| Cue / context | The time, place, preceding action or state that triggers the behavior | "After I drop the kids at school" |
| Habit | A cue-behavior link strong enough that the cue prompts the action automatically | Shoes on and out the door without deciding |
| Automaticity | The defining feature of a habit: doing it without deliberation, effort or remembering to | "I start doing it before I realize I'm doing it" |
Two consequences matter in practice:
- Habits form from repetition in a stable context, not from frequency alone. Running at random times three days a week builds fitness, but much less automaticity than running at the same time, after the same cue.
- Once formed, habits persist when motivation drops. That is the whole point. Diary studies by Wendy Wood and colleagues found that much of everyday behavior is this kind of repetition in the same context, carried out while people are thinking about something else.
2. How long it really takes
The "21 days to form a habit" claim has no scientific basis. According to Gardner, Lally and Wardle, it appears to trace back to anecdotes about plastic surgery patients adjusting to their new appearance in about 21 days.
The best-known real data comes from Lally et al. (2010). 96 volunteers chose a simple eating, drinking or activity behavior and did it daily in the same context (for example "after breakfast") for 12 weeks, rating automaticity every day.
- Automaticity rose quickly at first and then flattened, following an asymptotic curve: the early repetitions bring the biggest gains.
- Among participants whose data fit the model well, the time to reach 95% of their own plateau ranged from 18 to 254 days, with a median of 66 days.
- Simpler behaviors became automatic faster than complex ones: drinking water plateaued sooner than doing 50 sit-ups.
- Missing one opportunity did not materially affect the habit formation process.
In December 2024, Singh, Murphy, Maher and Smith (University of South Australia) published a systematic review and meta-analysis on the time to form health habits, in Healthcare:
- 20 studies with 2,601 participants, covering physical activity, healthy eating, drinking water, flossing, vitamins and reducing sedentary time.
- The four studies that measured time to habit formation reported medians of 59-66 days and means of 106-154 days, with individual times from 4 to 335 days.
- Interventions produced a clear increase in habit strength (standardized mean difference 0.69).
- Habit strength was influenced by frequency, timing, type of habit, personal choice and how much people liked the behavior. Morning practices and self-selected habits tended to be stronger.
The practical summary: plan for about two to three months of deliberate repetition for a simple daily habit, and longer for complex ones. The median is around two months; the mean is pulled higher by the people and behaviors that take much longer. If you started on January 1st, you are not late. You are in the middle of the curve.
3. Implementation intentions: plan the "when and where"
A goal intention says "I intend to reach X". An implementation intention adds the cue and the response: "If situation Y occurs, then I will do Z."
This is one of the best-supported techniques in behavior change research. Gollwitzer and Sheeran's 2006 meta-analysis of 94 independent studies with more than 8,000 participants found a medium-to-large effect on goal attainment (d = 0.65) from forming implementation intentions, compared with goal intentions alone. Planning the cue in advance means the situation itself triggers the action, which is exactly the mechanism habits run on.
| Vague goal | Implementation intention |
|---|---|
| "Do more deep work" | "When I sit down at my desk at 9:00, I will close Slack and email and open the current design doc." |
| "Learn Rust this year" | "After I finish lunch on weekdays, I will do one exercise from the Rustlings repo." |
| "Exercise more" | "When I close my laptop at 18:00, I will put on my running shoes." |
You can also plan for obstacles: "If an incident interrupts my morning block, then I will do the block right after lunch."
4. Habit stacking: borrow an existing cue
Habit stacking is a popular application of implementation intentions: use an existing habit as the cue for the new one. BJ Fogg's Tiny Habits (2019) phrases it as a recipe: "After I [anchor], I will [tiny behavior]", followed by a small celebration. James Clear's Atomic Habits (2018) uses the same formula: "After [current habit], I will [new habit]."
Good anchors are already automatic (making coffee, opening the laptop, the end of standup), specific ("after I pour my first coffee", not "in the morning"), as frequent as the new habit, and a logical fit for it.
Keep the new behavior small at first. Lally's data show that simple behaviors become automatic faster. "Open the design doc" is easier to automate than "write 1,000 words", and once you have opened it, continuing is easier.
5. Friction: make the good path easy and the bad path hard
Wendy Wood's Good Habits, Bad Habits (2019) summarizes decades of habit research with a practical message: change the environment, not your resolve. Adding friction (time, distance, steps) to a behavior makes it less likely; removing friction makes it more likely.
| Habit | Reduce friction (do it more) | Add friction (do it less) |
|---|---|---|
| Deep work | Calendar block that auto-declines meetings; doc already open on the desk; noise-cancelling headphones by the keyboard | Log out of Slack on the work laptop during the block; phone in another room |
| Learning | Course or book open in a pinned tab; a learning/ repo with today's exercise ready |
Remove news and social apps from the browser bookmarks bar |
| Exercise | Gym bag packed by the door; running clothes laid out the night before; gym on the commute route | Put the TV remote in a drawer; sign out of streaming apps on weeknights |
As in systems design, the default path is the one that gets used. Make the habit the default.
6. Reward timing: make it feel good now
Most good habits pay off later: health, skills, a promotion. The research suggests that delayed rewards help you set goals but immediate rewards keep you doing them.
- Woolley and Fishbach (2017) found that the presence of immediate rewards (for example, enjoying the activity) predicted persistence at New Year's resolutions, studying and exercise, while delayed rewards did not, even though people said they pursued these activities mainly for the delayed benefits.
- Milkman, Minson and Volpp (2014) tested temptation bundling: participants who could only listen to page-turner audiobooks at the gym initially visited the gym 51% more often than controls. The effect declined over time, especially after the Thanksgiving holiday.
- The 2024 review also found positive feelings about the behavior among the factors linked to stronger habits.
In practice: pick the most enjoyable version of the behavior that still does the job, bundle it with something you like (a podcast only while running), and close the loop right away (tick the box, push the commit). Fogg's "celebration" step serves the same purpose.
7. Missing a day, and what does matter
Lally's finding that missing one opportunity did not materially affect habit formation is one of the most useful in the literature, because the most common way habits die is not the missed day itself but the reaction to it: "I broke the streak, so the plan has failed."
What does matter is consistency over the whole period. In the same study, performing the behavior more consistently was associated with better fit of the habit formation curve. A popular heuristic from habit writers is "never miss twice": it is a rule of thumb rather than a research finding, but it fits the evidence well. One miss is noise; a run of misses is the habit decaying.
Plan for misses in advance: define a minimum version for bad days (one exercise, a 10-minute walk, 25 minutes of deep work), which still repeats the cue-behavior link, and an if-then plan for disruptions ("If I'm traveling, then I will do the bodyweight routine after I unpack").
8. Identity: "I am someone who..."
Habit books often recommend framing habits as identity ("I am a runner") rather than outcomes ("I want to run a marathon"). The evidence here is more indirect, but there is some. In Bryan, Walton, Rogers and Dweck (2011), framing voting as an identity ("being a voter") rather than a behavior ("voting") increased interest in registering and, in two statewide elections, actual turnout measured from official records.
The useful, modest takeaway: small wins become evidence for a self-concept, and a self-concept makes the next repetition feel consistent rather than effortful. "I'm an engineer who writes before coding" is easier to act on than "I should write more design docs". Identity follows repetition; it does not replace it.
9. Applied to an engineer's work
| Habit | Cue (anchor) | Behavior (minimum version) | Friction changes | Immediate reward |
|---|---|---|---|---|
| Morning deep work | Sitting down at the desk at 9:00 | Close chat and email, open the hardest task (25 minutes minimum) | Auto-decline meetings before 11:00; phone in another room | Coffee you like, saved for this block; tick on the tracker |
| Daily learning | Finishing lunch | One exercise or 10 pages (15 minutes minimum) | Material open in a pinned tab; next exercise chosen the day before | Commit to a learning/ repo and watch the graph fill |
| Exercise | Closing the laptop at end of day | Shoes on and out the door (10-minute walk minimum) | Clothes laid out; gym on the way home | Podcast or audiobook only while exercising |
Start with one habit. The 2024 review found self-selected habits were stronger, so pick the one you actually want, not the one you feel you should want.
10. The cheatsheet
| Principle | What the research says | Do this |
|---|---|---|
| Habits are cue-driven | Habits are actions triggered automatically by contextual cues (Gardner, Lally and Wardle; Neal, Wood and Quinn) | Pick one stable cue and do the behavior after it, every time |
| It takes months, not weeks | Median 66 days, range 18-254 (Lally); medians 59-66, means 106-154, range 4-335 days (Singh et al.) | Commit to about 10 weeks before judging; longer for complex behaviors |
| Start small | Simpler behaviors became automatic faster (Lally) | Define a minimum version you can do on your worst day |
| Plan if-then | Implementation intentions: d = 0.65 across 94 studies (Gollwitzer and Sheeran) | Write "When X, I will Y" and a backup plan for obstacles |
| Stack on existing habits | Anchoring to an existing routine provides a ready-made cue (Fogg; Clear) | "After I [existing habit], I will [new habit]" |
| Design the environment | Friction strongly shapes behavior (Wood) | Remove steps for the habit; add steps for the competing behavior |
| Reward now | Immediate rewards predict persistence better than delayed ones (Woolley and Fishbach); temptation bundling raised gym visits (Milkman et al.) | Make it enjoyable; bundle it; mark completion immediately |
| Misses are fine | Missing one opportunity did not materially affect habit formation (Lally) | Never let one miss become a reason to quit; avoid two in a row |
| Identity follows repetition | Identity framing changed behavior in voting experiments (Bryan et al.) | Describe yourself as the person who does it, then keep the evidence coming |
11. A simple tracking template
Track two things: did I do it (daily), and how automatic does it feel (weekly). The second uses the four items of the Self-Report Behavioural Automaticity Index (SRBAI), a short scale from the habit research literature. Rate each from 1 (strongly disagree) to 7 (strongly agree) and average them:
"[Behavior] is something...
- I do automatically.
- I do without having to consciously remember.
- I do without thinking.
- I start doing before I realize I'm doing it."
A plain markdown log is enough:
| Date | Cue | Done? | Minimum or full | Note | SRBAI (Sundays) |
|---|---|---|---|---|---|
| 2025-02-24 | Sat at desk, 9:00 | Yes | Full (90 min) | Design doc for queue migration | |
| 2025-02-25 | Sat at desk, 9:00 | Yes | Minimum (25 min) | Incident at 9:30 | |
| 2025-02-26 | Sat at desk, 9:00 | No | Offsite all day |
Or a few lines of Python over a CSV, if you prefer numbers. Dates with no row count as misses:
import csv
from datetime import date, timedelta
with open("habit_log.csv") as f: # columns: date,done,srbai
rows = list(csv.DictReader(f))
done = {date.fromisoformat(r["date"]) for r in rows if r["done"] == "1"}
start, today = min(done), date.today()
days = [start + timedelta(d) for d in range((today - start).days + 1)]
consistency = sum(d in done for d in days) / len(days)
double_misses = sum(1 for a, b in zip(days, days[1:]) if a not in done and b not in done)
scores = [(r["date"], float(r["srbai"])) for r in rows if r["srbai"]]
print(f"Day {len(days)} of ~66 | consistency {consistency:.0%} | double misses: {double_misses}")
print("Automaticity (1-7):", scores)
What to look for: the automaticity score should rise quickly in the first weeks and then level off. If it stays flat after a month, the cue is probably not stable enough. Change the anchor, shrink the behavior, or remove friction, rather than trying harder.
Why this matters
- Motivation is a starting resource, not a strategy. It fades by February for almost everyone. Habits are how behavior survives that.
- The timeline is longer than the myth. Expecting 21 days and getting 66 (or 150) is a common reason people quit just before it gets easier.
- Design beats willpower. Cues, friction and immediate rewards are things you can engineer, the same way you engineer defaults in software.
- Consistency matters more than perfection. One missed day is noise; quitting after it is the real failure mode.
Final Thoughts
If your January plan has already faded, the research suggests a reset rather than a restart from zero: pick one behavior, attach it to a cue you meet every day, shrink it until it is easy, remove the friction, make it pleasant now, and keep going for about ten weeks while tracking how automatic it feels.
It is not glamorous, and it is not fast. But it is the closest thing behavior science has to a reliable method. The goal is not to feel motivated every morning. It is to reach the point where you do not need to.
Sources
- Norcross, Mrykalo and Blagys, Auld lang syne: Success predictors, change processes, and self-reported outcomes of New Year's resolvers and nonresolvers, Journal of Clinical Psychology (2002): 46% of resolvers vs. 4% of nonresolvers continuously successful at six months.
- Gardner, Lally and Wardle, Making health habitual: the psychology of 'habit-formation' and general practice, British Journal of General Practice (2012): habit definition, origin of the 21-day myth, expect around 10 weeks, practical habit-formation advice.
- Neal, Wood and Quinn, Habits: A Repeat Performance, Current Directions in Psychological Science (2006): habits as context-cued response dispositions; diary studies of everyday habitual repetition.
- Lally, van Jaarsveld, Potts and Wardle, How are habits formed: Modelling habit formation in the real world, European Journal of Social Psychology (2010): asymptotic automaticity curve, 18-254 days, median 66 days, missing one opportunity, consistency.
- Singh, Murphy, Maher and Smith, Time to Form a Habit: A Systematic Review and Meta-Analysis of Health Behaviour Habit Formation and Its Determinants, Healthcare (December 2024): 20 studies, 2,601 participants, medians 59-66 days, means 106-154 days, range 4-335 days, SMD 0.69, determinants including morning timing and self-selection.
- Gollwitzer and Sheeran, Implementation Intentions and Goal Achievement: A Meta-analysis of Effects and Processes, Advances in Experimental Social Psychology (2006): 94 studies, more than 8,000 participants, d = 0.65.
- Woolley and Fishbach, Immediate Rewards Predict Adherence to Long-Term Goals, Personality and Social Psychology Bulletin (2017).
- Milkman, Minson and Volpp, Holding the Hunger Games Hostage at the Gym: An Evaluation of Temptation Bundling, Management Science (2014): 51% more gym visits initially, declining over time.
- Bryan, Walton, Rogers and Dweck, Motivating voter turnout by invoking the self, PNAS (2011): identity framing increased registration interest and turnout.
- Oscarsson, Carlbring, Andersson and Rozental, A large-scale experiment on New Year's resolutions: Approach-oriented goals are more successful than avoidance-oriented goals, PLOS ONE (2020).
- Gardner, Abraham, Lally and de Bruijn, Towards parsimony in habit measurement: Testing the convergent and predictive validity of an automaticity subscale of the Self-Report Habit Index, International Journal of Behavioral Nutrition and Physical Activity (2012): the four SRBAI items.
- Wendy Wood, Good Habits, Bad Habits: The Science of Making Positive Changes That Stick (Farrar, Straus and Giroux, 2019): friction and environment design.
- BJ Fogg, Tiny Habits: The Small Changes That Change Everything (Houghton Mifflin Harcourt, 2019), and James Clear, Atomic Habits (Avery, 2018): anchor recipes and habit stacking.