Sub topic 7
How long it takes: ranges, not a magic number
This chapter assumes you know the cue, response and reward idea from earlier chapters, and that you understand habit strength as something that grows with repetition in a stable context. You don't need statistics knowledge. The Python snippets are short and optional. By the end you should be able to explain why "21 days" is not a rule and what a realistic timeline looks like. You should also be able to say what a missed day does and does not cost you.
Where the 21-day figure comes from
The claim that a habit takes 21 days is widely repeated. It traces back to Maxwell Maltz, a plastic surgeon who wrote Psycho-Cybernetics in 1960. He observed that patients seemed to need "a minimum of about 21 days" to adjust to a changed appearance after surgery. This was a clinical impression about adjusting to a new face or limb. It was not a measurement of how long a behaviour takes to become automatic. Later self-help writing turned "a minimum of about" into "exactly", and moved the claim to a different kind of change.
No study of habit formation supports a fixed number. Treat "21 days" as a story that spread, not as a finding.
What the data show
The most cited empirical work on this question is a 2010 study by Phillippa Lally and colleagues at University College London. The design was simple:
- 96 volunteers each picked one new daily behaviour, such as drinking a glass of water with lunch, eating a piece of fruit, or running for 15 minutes after dinner.
- Each person tied the behaviour to a specific cue in their day.
- Each day for up to 12 weeks, they logged whether they did it and rated how automatic it felt.
The researchers fitted a curve to each person's automaticity ratings and estimated when it levelled off. For the participants whose curves fitted well, the time to reach the plateau had:
- a median of 66 days
- a range of 18 to 254 days
The upper end is an extrapolation, because the study ran only 84 days. Two other results matter as much as the median:
- Simple behaviours became automatic faster than more demanding ones. Drinking water beat running.
- Missing a single day did not noticeably damage the curve. Repeated misses mattered more.
The study was small, the participants were self-selected, and automaticity was self-reported. Read 66 days as one reasonable data point, not as a new magic number to replace 21.
Why a single number cannot exist
Habit strength grows along a curve that is steep at first and then flattens. A curve that flattens gradually has no obvious moment when the habit "arrives". The question "how many days?" only makes sense once you choose a cutoff. Three things then change the answer.
- The cutoff. Is the habit formed at 50% of the plateau, 90%, or 95%? The curve never quite reaches its maximum, so a stricter cutoff always takes longer.
- The learning rate. Some people, behaviours and contexts build the cue-response link faster than others. A behaviour that is easy, rewarding right away, and tied to a very consistent cue builds faster.
- Behaviour complexity. A one-step action such as taking a vitamin has less to automate than a 40-minute workout that includes travel, clothing, and effort.
A toy model you can run
The code below uses the model from earlier in the tutorial. Each repetition closes a fixed fraction of the remaining gap to full strength. The model is an illustration of the curve's shape. It is not a measured result, and the rates below are not estimates for any real behaviour.
def days_to_threshold(threshold=0.95, rate=0.05, max_days=1000, miss_days=()):
"""Return the calendar day on which strength first reaches threshold.
miss_days is a collection of day numbers on which the action is skipped.
A skipped day leaves strength unchanged.
"""
strength = 0.0
for day in range(1, max_days + 1):
if day not in miss_days:
strength += rate * (1 - strength)
if strength >= threshold:
return day
return None
print("Different learning rates, threshold 0.95")
for rate in (0.10, 0.05, 0.03, 0.02):
print(rate, days_to_threshold(0.95, rate))
print("Different thresholds, rate 0.05")
for threshold in (0.5, 0.9, 0.95, 0.99):
print(threshold, days_to_threshold(threshold, 0.05))Running it prints these results:
| Learning rate | Days to reach 0.95 |
|---|---|
| 0.10 | 29 |
| 0.05 | 59 |
| 0.03 | 99 |
| 0.02 | 149 |
| Threshold (rate 0.05) | Days |
|---|---|
| 0.50 | 14 |
| 0.90 | 45 |
| 0.95 | 59 |
| 0.99 | 90 |
Two points follow from the tables.
- Halving the rate roughly doubles the time. The answer is very sensitive to a parameter that differs between people and behaviours.
- Moving the threshold from 0.50 to 0.99 multiplies the time by more than six. "How long?" depends heavily on what you count as done.
The shape also explains why early progress feels fast and later progress feels slow. In this model the first ten days produce about 40% of the total possible strength. The next ten add about 24 points, and the ten after that add about 14. The habit is still getting stronger, but each repetition adds less than the one before.
What a missed day does
Add a skipped day in the model:
print(days_to_threshold(0.95, 0.05)) # 59
print(days_to_threshold(0.95, 0.05, miss_days={10})) # 60
print(days_to_threshold(0.95, 0.05, miss_days={10, 11, 12, 13, 14, 15, 16})) # 66A single miss delays the finish by one day, because the model only adds strength on days you act and does not subtract anything. A week-long gap delays it by a week. This matches the broad pattern in the Lally data, where an isolated lapse did little harm.
The model is too kind in one respect. Real habits can weaken over a long absence, especially if the context also changes. Chapter content on context change covers that. For now, the practical reading is that a single missed day is a small cost. A long stretch of misses is a larger one, because you stop adding repetitions and the cue-response link has time to fade.
Reading timelines sensibly
Use these rules when you see a number in a book, an app or an article.
- Ask what was measured. Self-reported automaticity, observed behaviour and "I still do it after a year" are different outcomes. They give different timelines.
- Ask what behaviour it was. A figure for drinking water does not transfer to a daily gym session.
- Prefer ranges. A median of 66 days with a spread from about 18 to 254 says more than "two months".
- Expect individual variation. Within one study, the slowest person took more than ten times as long as the fastest.
- Separate "automatic" from "effortless". A behaviour can be quite automatic to start while still needing effort to carry out. Running 15 minutes may be triggered automatically after dinner and still be hard work.
Planning around the range
Because you cannot know your own rate in advance, plan for the uncertainty instead of picking a date.
- Choose a consistent cue. Repetition in a stable context is what builds the link. A cue that moves around slows the curve.
- Start small. A simpler behaviour tends to reach automaticity sooner, and you can enlarge it once the cue-response link exists.
- Commit to a review point, not a finish line. For example, "I will check in at 12 weeks and rate how automatic it feels." This fits the length of the Lally study and gives a meaningful comparison.
- Treat early gains as misleading. The first weeks feel like fast progress and the later ones feel flat. Flat progress does not mean the habit has stopped forming.
- Resume quickly after a lapse. Under the model, one skipped day costs one day. The expensive mistake is treating one miss as proof that the habit has failed and abandoning it.
Common errors
- Believing the habit is "done" on day 21 and stopping tracking. At that point most real behaviours are well below their plateau.
- Believing the habit is "done" on day 66. The median says half of the sample took longer.
- Reading the plateau as a wall. The curve flattens because there is less left to gain, not because you have stopped improving.
- Counting only perfect streaks. A streak counter punishes an isolated lapse that has little effect on the underlying habit strength.
- Comparing yourself to someone else's timeline. Rate depends on the behaviour, the cue and the person.
Exercise
A friend says she has been flossing every night for 30 days and still has to remind herself, so she thinks she has failed because "habits take 21 days". Using the model and the Lally findings, explain why her conclusion is wrong, and say which two things you would check before deciding whether flossing is becoming automatic.
Show answer
The 21-day figure has no empirical basis as a formation time. It comes from Maltz's observation about adjusting to surgery. In the Lally study the median time to plateau was 66 days, with a range of 18 to 254, so needing more than 30 days is ordinary. In the model, strength at day 30 with rate 0.05 is only about 0.78, below the 0.95 threshold that is reached at day 59. Check (1) whether flossing is tied to a consistent cue, such as right after brushing, because a moving cue slows the curve, and (2) whether she rates it as more automatic now than at the start, for instance with a short self-report question about whether she does it without thinking. Rising ratings show the habit is forming even if it is not yet fully automatic.
Exercise
Using daystothreshold, what happens to the time to reach 0.95 if the rate is 0.03 instead of 0.05, and what does that suggest about comparing two people's habit timelines?
Show answer
With rate 0.03 the function returns 99 days instead of 59, about 68% longer. A modest difference in learning rate produces a large difference in time, so two people can follow the same process and still have very different timelines. This is why a single number for everyone is misleading.