Model NITI Aayog, 24-27 Dec, online. Write an original white paper.

How Does a Habit Form in the Brain? | How It Works

12 min read

On this page

What is the short answer?

A habit starts as an action chosen on purpose. With repetition in the same setting, control of the action shifts, until a cue in that setting triggers it with little conscious thought.

Much of this shift happens in the basal ganglia, in a part called the striatum. In rat studies, nerve cells there come to fire at the start and end of a learned action rather than all through it, so the action runs as one block, or chunk.

The chemical dopamine helps teach the brain which actions bring reward. In rat studies, the brain pattern behind a habit is hard to erase once formed. It can go quiet and return when the old cues come back.

Definition: A habit is a learned action that a cue in a familiar setting triggers automatically. It differs from a goal-directed action, which is chosen for its outcome and changes when that outcome stops being worth having.

What do researchers mean by a habit?

Psychologists at University College London (UCL), in the United Kingdom, describe habits as learned actions triggered automatically when a person meets the situation linked to them. A UCL research blog post of 29 June 2012 says habits form through context-dependent repetition: the same action in the same setting, again and again.

A 2009 study by Elizabeth Tricomi, Bernard Balleine and John O'Doherty says habits are marked by an insensitivity to their consequences, which sets them apart from goal-directed actions.

Researchers test this by making a reward unpleasant. MIT, a university in the United States, reported in October 2012 that rats trained on a maze kept running to the cued side even then. In a 2013 MIT study, rats whose habit-building had been blocked stopped running, showing that no habit had formed.

Which parts of the brain take over as a habit forms?

The McGovern Institute for Brain Research at MIT, a research institute, said in February 2018 that the striatum, found in the basal ganglia, plays a major role in habit formation, as Ann Graybiel's laboratory had shown.

Northwestern University, in the United States, said on 24 August 2022 that two circuits start in the striatum:

  • The dorsomedial striatum starts a circuit that controls goal-directed behaviour.
  • The dorsolateral striatum starts a circuit that controls habit formation.

An idea called the ascending spiral tries to explain the hand-over: signals from the dorsomedial striatum travel to the substantia nigra, where they were thought to make dopamine neurons fire and release dopamine in the dorsolateral striatum. Northwestern says such dopamine release is required for habit formation, but its team found mixed evidence for the spiral.

The 2009 Tricomi study scanned people's brains during long training and found rising sensitivity to cues in the posterior putamen, a region of the dorsolateral striatum. The authors say their results give evidence for a shift from goal-directed to habit-based control in humans.

How does dopamine help the brain learn what to repeat?

The Federation of European Neuroscience Societies (FENS), a scientific society, described the experiments on 6 March 2017, when Wolfram Schultz, Peter Dayan and Ray Dolan won the Brain Prize. About 30 years earlier, Schultz was studying learning in monkeys at the University of Fribourg, in Switzerland. FENS reports this pattern in their dopamine neurons:

  • Before learning: the neurons respond whenever a reward is given.
  • After learning: they respond when the correct visual pattern appears, and the response to the reward disappears.
  • No reward when expected: their activity drops.
  • A reward at an unexpected time: they respond to it.

Dayan saw that this matches a signal known from early artificial intelligence as a reward prediction error: in plain terms, the gap between what was predicted and what arrived. BrainFacts.org, run by the Society for Neuroscience, a US scientific society, called it a teaching signal for learning on 21 December 2021.

The same article marks this as a simplified picture. Dayan says dopamine release reflects much more than a simple prediction error, and that some dopamine neurons also respond to punishment.

What did the rat maze studies at MIT show about chunking?

MIT reported a maze study from Graybiel's laboratory on 8 December 1999, based on a paper in the journal Science. Rats ran a T-shaped maze, and a tone told them to turn left or right to find a reward.

As the maze became automatic, the striatal neurons' response to the turn faded, while the start and end of the run drew a stronger response. MIT said the brain codes whole sequences of behaviour as units, or chunks, that specific settings can trigger.

A study reported by MIT on 19 October 2005 showed the change over time. While rats were learning, the neurons fired throughout the run. Once the cues were learned, they fired most at the beginning and the end.

The maze pattern might have tracked movement rather than the routine. In February 2018, the McGovern Institute reported a test with rats pressing two levers in a set order. Striatal neurons fired as the routine began, went quiet during it and fired again at its end, a pattern called task-bracketing. Inhibitory neurons called interneurons were active in the middle.

How long does a habit take to form in people?

One measurement in people comes from Phillippa Lally and colleagues at UCL, in a study that the UCL blog and Surrey date to 2010. The 2012 UCL blog post says volunteers repeated a daily behaviour of their choice after the same daily cue and were tracked for 84 days, reporting each day how automatic it felt. This feeling is called automaticity.

The blog says habits took 66 days to form on average. For one person it took 18 days. Another was forecast to form the habit only after 254 days. Early repetitions brought large rises in automaticity, which shrank with each repeat until automaticity reached a plateau.

Lally, now at the University of Surrey, in the United Kingdom, said on 21 January 2026 that the range was 18 to 254 days, and that the study really showed habit formation is highly variable. The UCL blog calls the popular claim of 21 days unfounded.

Why are habits hard to undo in the brain?

Graybiel's experiments suggest a habit is hidden rather than deleted. In the 2005 study, the researchers removed the reward, so the maze cues meant nothing. The neurons went back to firing throughout the run, the rats stopped running and the habit pattern disappeared.

When the reward returned, the pattern with its start and end bursts came straight back. MIT's report said the brain seems to retain a memory of the habit context, which the right cues can trigger.

MIT reported on 29 October 2012 that switching off the infralimbic cortex, a small part of the prefrontal cortex, the planning region, with light made trained rats drop their habit almost at once. The rats then formed a new habit. Switching the area off again brought back the original habit, which had never really been forgotten.

MIT's 2013 report adds that the habit pattern in the striatum stays stored even after a habit is broken, while the infralimbic pattern appears and disappears as habits form and break.

How well do animal habit studies explain human habits?

Most of this brain evidence comes from rats and monkeys. Researchers disagree about how cleanly it carries over to people.

  • One group of researchers argues that long training does build habits in people, with a region of the dorsolateral striatum taking part. The 2009 Tricomi study, a journal paper whose record is held by the California Institute of Technology, in the United States, found that extensive training made people's behaviour less sensitive to a drop in the outcome's value.
  • Another group argues that this is hard to show in people. A team led by Sanne de Wit at the University of Amsterdam, in the Netherlands, noted in a July 2018 journal paper that many studies have induced habits in healthy rats by overtraining. Their own five attempts in humans failed, two of them repeats of the original human demonstration. They suggest these tests may be insensitive to training length in humans.

MIT's 2012 report adds that switching brain regions off with light would be too invasive for humans.

How does this work with real numbers?

How spread out were the times in the UCL study?

Use the study's figures from the UCL blog: an average of 66 days, a shortest time of 18 days and a longest forecast of 254 days. These are one study's results, not a rule.

  • Shortest below the average: 66 minus 18 = 48 days.
  • Longest above the average: 254 minus 66 = 188 days.
  • Average as a share of a year: 66 ÷ 365 = 0.18, or about 18 per cent.
  • Beyond the tracking period: 254 minus 84 = 170 days, which is why 254 was a forecast.

The long side of the range stretches about 3.9 times as far as the short side (188 ÷ 48).

How does a curve that levels off behave?

Take an illustrative model. Full automaticity scores 100, and each repetition closes an illustrative 10 per cent of the remaining gap. After n repetitions, automaticity = 100 × (1 minus 0.9ⁿ).

  • After 1 repetition: 100 × 0.1 = 10.
  • After 10 repetitions: 0.9¹⁰ = 0.349, so 100 × 0.651 = about 65.
  • After 30 repetitions: 0.9³⁰ = 0.042, so 100 × 0.958 = about 96.

The first repetition adds 10 points, the tenth about 3.9 and the thirtieth about 0.5. The curve creeps toward 100 without reaching it, a limit called an asymptote. This is a simplified model of the plateau the study describes, not a measurement.

Where can the student go deeper in World 101?

This page follows one system: how repeated actions move from purposeful choice to automatic routine inside the brain, and why the routine is hard to erase. The World 101 subject How Habits Form and Break takes the wider view of the field. Board notes on learning and memory cover the exam topics.

Three related subjects carry the ideas further. Neuroscience explains how nerve cells, like those in the striatum, fire and signal to one another. Memory and Its Failures looks at the different kinds of memory, including memory for skills and routines. How Learning Works follows how practice and feedback change what a learner can do, ideas that run through the dopamine studies.

Sources

  • UCL Research Department of Behavioural Science and Health blog, B. Gardner, "Busting the 21 days habit formation myth", 29 June 2012 (on Lally and colleagues, 2010).
  • University of Surrey news, interview with Dr Pippa Lally, 21 January 2026 (study published 2010).
  • MIT News, "First evidence seen that learned behaviors change the brain", 8 December 1999.
  • MIT News, "Brain researchers explain why old habits die hard", 19 October 2005.
  • MIT News, "How the brain controls our habits", 29 October 2012.
  • MIT News, "Breaking habits before they start", 27 June 2013.
  • McGovern Institute for Brain Research at MIT, A. Trafton, report on a brain pattern that helps habits form, 8 February 2018.
  • Northwestern Medicine news, "Investigating the Role of Dopamine Circuits in Habit Formation", 24 August 2022.
  • FENS, "The Brain Prize 2017 winners announced", 6 March 2017.
  • BrainFacts.org, Society for Neuroscience, "Discovering Dopamine's Role in Reward Prediction Error", 21 December 2021.
  • E. Tricomi, B. Balleine and J. O'Doherty, European Journal of Neuroscience, June 2009 (CaltechAUTHORS record).
  • S. de Wit and colleagues, Journal of Experimental Psychology: General, July 2018 (University of Amsterdam record).

Common errors and misconceptions

  • Misconception: Every habit forms in 21 days. Correct: The UCL study found an average of 66 days, with a range of 18 to 254 days.
  • Misconception: A broken habit is erased from the brain. Correct: In MIT's rat studies, the striatal habit pattern stayed stored and returned quickly when the old cues and reward came back.
  • Misconception: Dopamine neurons simply fire at every reward. Correct: After learning, they respond to the cue that predicts a reward, and their activity drops when an expected reward fails to come.
  • Misconception: The striatum does one single job. Correct: Its dorsomedial part is linked to goal-directed behaviour and its dorsolateral part to habit formation.
  • Misconception: Rat habit studies show exactly how human habits work. Correct: One human study found a similar shift, but a team led by Sanne de Wit at the University of Amsterdam failed five times to produce it.

Key takeaways

  • A habit is a learned action that a familiar cue triggers automatically, while a goal-directed action depends on the value of its outcome.
  • The striatum, part of the basal ganglia, is central to habits; its dorsolateral part is linked to habits and its dorsomedial part to goals.
  • Dopamine neurons signal a reward prediction error, a teaching signal, though Peter Dayan says dopamine release reflects much more than that.
  • In MIT's rat studies, striatal neurons came to fire at the start and end of a routine, bracketing it as one chunk.
  • In the UCL study, habits took 66 days on average, but individual times ran from 18 to 254 days.
  • In MIT's rat studies, striatal habit patterns stayed stored after a habit stopped, which may help explain why old habits can return quickly.

Test yourself

What separates a habit from a goal-directed action?

A habit is triggered by a cue and is insensitive to its consequences. A goal-directed action changes when its outcome loses value.

Which parts of the striatum are linked to goals and to habits?

The dorsomedial striatum is linked to goal-directed behaviour, and the dorsolateral striatum to habit formation.

What is task-bracketing?

Striatal neurons fire as a learned routine begins, go quiet during it and fire again at its end, marking it as one chunk.

How do dopamine neurons respond when an expected reward does not come?

Their activity drops at the time the reward was expected, a sign that they track the gap between prediction and outcome.

In the UCL study, how far was the longest time from the average of 66 days?

254 minus 66 = 188 days. The shortest time, 18 days, was 48 days below the average.

In the illustrative model where each repetition closes 10 per cent of the gap, what is automaticity after 10 repetitions?

100 × (1 minus 0.9¹⁰) = 100 × 0.651, or about 65 out of 100.

Go deeper in World 101: How Habits Form and Break

Write about it

Turn a question from this chapter into a paper.

The Writing Studio has a structure guide, a rubric and citation tools for 15 formats, from essays to research papers. A free account keeps up to five drafts. Learnacy Essential adds feedback from an AI writing coach and submission to The OYI Review.

Publication depends on review and is not guaranteed.