The habit loop: cue, routine, reward and craving

Every habit runs on the same short circuit: a cue, a routine, a reward, and the craving that pulls it along. Here is how the loop works in your brain, and how to use it to build a good habit and change one you'd rather drop, with worked examples and a loop-mapping worksheet.

Written by the Little and Often team, makers of the Meadow habit tracker. For general information only, not medical advice.

A woman takes a dog lead from a hook as her dog waits for a walk.

A habit loop is the short circuit your brain runs to make a behaviour automatic. A cue sets it off, you carry out a routine, and you get a reward, and once that sequence has repeated enough your brain files the whole thing away and runs it for you without being asked. Learn to spot the loop in one of your own habits and you can build a new one on purpose or take apart one you'd rather lose, because every habit runs on the same few parts.

Those parts are the cue, the routine, the reward, and the craving that pulls the whole thing along.

Building a habit and breaking one can feel like opposite jobs. They're the same loop worked from two ends, which is why this one model sits underneath both, and why it's worth learning once.

Cue, routine, reward, and the craving underneath

Cue, routine and reward connected in a repeating loop on three notes.
Cue: switch the kettle on. Action: one gentle stretch. Reward: enjoy a moment of movement. Repeat at the same cue.
Cue: switch the kettle on. Action: one gentle stretch. Reward: enjoy a moment of movement. Repeat at the same cue.

The three-part version comes from a set of MIT studies that the journalist Charles Duhigg pulled together in The Power of Habit. He describes the loop at the core of every habit as three pieces: a cue, a routine and a reward. His shorthand for how your brain stores it is worth keeping in your head: "When I see CUE, I will do ROUTINE in order to get a REWARD."

The cue is the trigger. Duhigg notes that almost every cue fits one of five categories: a location, a time, an emotional state, other people, or the action you did right before. The 3pm slump. Walking through the front door. Feeling bored.

The routine is the behaviour itself, which can be physical, mental or emotional. It's the part you notice, and the part you usually want to change.

The reward is the payoff that tells your brain the loop was worth keeping. It might be a jolt of energy, a moment of calm, a break from something dull, or a small hit of pride.

Sitting between the cue and the routine is the craving, the wanting that makes you act. Duhigg found that rewards work because they satisfy cravings we're often not aware of. James Clear, who wrote Atomic Habits, made craving a named fourth stage and put it plainly: cravings are "the motivational force behind every habit", and "what you crave is not the habit itself but the change in state it delivers." The biscuit is a stand-in for the pause you're after.

Here's one loop laid out. You sit down at your desk after lunch (cue), you feel the pull of a break (craving), you open your phone and scroll (routine), and you get a few minutes away from the task you were dreading (reward). Run that a few dozen times and the phone is in your hand before you've decided anything.

What the loop is doing in your brain

Habits form through repetition in a steady setting, not through wanting them badly enough. A review of the neuroscience, "Creatures of Habit", puts it this way: habits "strengthen through repetition and associations with cues from the surrounding environment such that their expression becomes dependent on the relevant cues." Once the link is built, the cue on its own pulls the behaviour out of you.

The habit researchers Wendy Wood and David Neal describe the same thing from the outside. Habits, they write, are "learned dispositions to repeat past responses", triggered by features of the context that have gone with the behaviour before, so that perceiving the context activates the response without a goal steering it.

There's a handover going on underneath. Early on, a new action leans on the part of the brain used for deliberate choices, wired through the dorsomedial striatum, the Creatures of Habit review explains. As the behaviour turns automatic, control slides to a different circuit through the dorsolateral striatum, the seat of habit, and that shift runs on dopamine and other signals tuning the connections between brain cells. Your brain moves the behaviour off the decision desk and onto autopilot, which is efficient and doesn't stop to ask whether the habit still helps you.

That's the odd thing about a habit you dislike. It isn't waiting on a decision. It's been handed to the part of you that runs on cue.

How to build a good habit with the loop

To build a habit, you set up a loop from scratch and give it every chance to run. Work through it in order.

  1. Choose a cue that already happens. The most reliable trigger is something you do every day without thinking, so tie the new action to it. The American Heart Association suggests attaching a new behaviour to a routine already in your day. "After I switch the kettle on" holds up better than "at 8am", because the kettle rarely gets skipped while the clock slides around.
  2. Keep the routine small. Make the behaviour so small you could do it on your worst day. One stretch, not a workout. A single glass of water, not a hydration plan. A small action clears the bar every time, and it can grow later on its own. Our guide to tiny habits goes into this method properly.
  3. Make the reward easy to feel. A loop needs a payoff your brain can catch, or no craving forms and the cue never learns to pull the action. Notice the good bit, the warmth of the tea or the quiet after the stretch, or add a small marker like ticking it off, so the reward lands while you're paying attention.

Put together, a new loop reads like this. After you fill the kettle each morning (cue), you do one shoulder stretch (routine), and you get the tea and a small tick on the calendar (reward). The stretch is small enough to survive a rushed morning, and the tick gives your brain something to want.

How to change a habit you'd rather drop

Changing a habit uses the same loop, worked backwards. You can't wipe the loop out, because the cue keeps arriving and the craving underneath doesn't leave with it. Duhigg's rule is to keep the cue and the reward and slot a new routine in between, so the loop still runs but ends somewhere better. He breaks the diagnosis into four steps.

  1. Name the routine. Write down the behaviour you want to change, the obvious middle of the loop.
  2. Experiment with the reward. Over a few days, try a different response to the same cue and see which one settles the urge. If a walk to the window kills the itch, you were after a break, not the snack.
  3. Isolate the cue. When the urge hits, note the five things Duhigg lists: where you are, the time, how you feel, who's around, and what you did right before. A pattern usually shows up within a few days.
  4. Have a plan. Decide in advance what you'll do when the cue arrives, in the shape "at 3:30 I'll walk to a friend's desk for ten minutes." Psychologists call this an implementation intention, and it's what turns the swap from a hope into a routine.

Duhigg used this on his own afternoon cookie habit. The cue turned out to be the time of day and the reward was a break and a chat, not the sugar, so he kept the 3:30 trigger, swapped the walk to the cafeteria for a walk to a colleague's desk, and after a few weeks the new routine ran on its own. For a fuller walk through swapping routines and riding out the slips, our guide to bad habits covers it in depth.

Map your own loop

Open our free printable: Map your own habit loop (PDF). Save or print it to use alongside this guide. No sign-up needed.

Before you change anything, get the loop out of your head and onto paper. Catching the parts is most of the work, because a loop you can see is one you can rework. Fill this in the moment the urge shows up.

The habit I'm looking at: __________
Cue (where, when, mood, who, what came before): __________
Craving (what I'm after): __________
Routine (what I do): __________
Reward (what I get): __________
New routine to try: __________

Filled in, a single entry might read like this.

The habit I'm looking at: evening phone scroll
Cue: 9pm, on the sofa, flat after dinner
Craving: a way to switch off
Routine: scroll for an hour
Reward: a break and an empty head
New routine to try: ten minutes of a paperback in the same spot

When the loop won't shift

You'll fall back into the old loop sometimes, and one slip doesn't undo the work behind it. In the habit study run by Phillippa Lally's team, covered by the British Psychological Society, a single missed day had little effect on the habit forming. That same study found the time to reach automatic ran from 18 days to a predicted 254, so there's no schedule you're falling behind. If the question of timing is nagging at you, we go into it in how long it takes to build a habit.

Some loops stop responding to swaps and plans because they've tipped into dependence, and that's a different thing that deserves different help. If a habit involving alcohol, nicotine, gambling or anything similar is doing real harm and you can't cut down, that's worth taking to your GP, who can point you towards the right support. Reaching out early tends to make it easier, not harder.

Give the loop a reward you can see

Meadow’s flower garden displayed on an iPhone.

The loop holds together when the reward is easy to feel, and Meadow builds a visible one into each day. It's a movement and habit app for iPhone from Wildcard Wellness, where you tick off a small habit, log a walk or a few minutes of yoga, and note your mood, energy and a daily win. Each day you show up, a new wildflower blooms in your own meadow, so the reward for the routine is something you can watch grow. There are no streaks, so a missed day resets nothing you've built, which suits a loop you're still teaching your brain to run.

Frequently asked questions

What are the parts of a habit loop?
Three in the classic version from Duhigg: a cue that triggers the behaviour, the routine you carry out, and the reward you get. A fourth part, the craving, sits between the cue and the routine and is the wanting that drives you to act. James Clear frames the same idea as four stages, calling them cue, craving, response and reward.

What's the difference between the reward and the craving?
The reward is what you get, the calm or the break or the sugar. The craving is the wanting for it beforehand, the pull that makes you act on the cue. You crave the change in state that follows, which is why a different routine can meet the same craving.

Can you break a habit loop for good?
You rarely erase one, because the cue keeps showing up and the craving stays. What works better is keeping the cue and the reward and giving the loop a new routine, so it runs to a better end. Adding a little friction to the old routine, like keeping the phone in another room, helps the swap hold.

Is the habit loop backed by science?
The cue-routine-reward pattern lines up with how habit learning works in the brain, where repetition in a steady setting shifts control from deliberate circuits to automatic ones. The tidy labels are a simplification of messier research, and they hold up well as a working map.

How long before a loop runs on its own?
There's no fixed number. Automatic behaviour showed up anywhere from about three weeks to several months in the research, depending on the person and the habit, so judge yourself by whether you're still turning up, not by a day count.

One thing to do today

Pick one habit and map its loop before you try to change a thing about it. Catch it in the act once today and note the five cue details, what you were craving, the routine you ran, and the reward you got. You're not changing anything yet. Once the loop is on paper you'll see where a new routine could slot in, and the habit stops feeling like a fight with yourself and starts looking like something you can rewire.

AUTHOR

Co-founder of Meadow.

Ash is co-founder of Meadow, a habit and movement tracking app that turns small acts of self-care into a growing wildflower meadow.

Little and often, with Meadow

Consistency, not intensity.

Meadow turns the movement you enjoy and the habits that help you feel good into a meadow of wildflowers. No streaks to break, and your flowers never wilt.

Download Meadow
The Meadow app on iPhone showing a wildflower meadow on day 27