Habit Stacking: The Formula, Examples and Failure Modes
By the Habit Dungeon team · Last updated:
Quick answer
Habit stacking means attaching a new habit to one you already do reliably, using the formula: after [current habit], I will [new habit]. The existing habit becomes the cue, so you never have to remember the new one. It works because the hard part of a habit is not effort — it is remembering at the right moment.
Habit stacking is the most useful single technique in behaviour change, and it is usually taught in one sentence and then misapplied. The idea comes from BJ Fogg's work on tiny habits and was popularised by James Clear in Atomic Habits: you take something you already do without thinking and hang the new behaviour directly off the end of it.
The formula is short. What follows is the part that decides whether it works: choosing the right anchor, sizing the new habit correctly, and diagnosing a stack that has quietly stopped firing.
The formula
After [current habit], I will [new habit].
That is it. 'After I pour my morning coffee, I will write down three priorities.' 'After I take off my work shoes, I will change into gym clothes.' 'After I brush my teeth at night, I will read two pages.'
What makes it work is that you are not adding a new thing to remember — you are borrowing an existing reliable trigger. Most habit failures are not failures of willpower, they are failures of memory. You did not decide against flossing; you did not think about flossing until you were already in bed.
The anchor habit does the remembering for you. That is the entire mechanism, and everything else on this page is about choosing the anchor well.
How to build a stack that holds
Pick an anchor you do without deciding
It must already be automatic — not something you usually do, something you always do. Making coffee, brushing teeth, sitting down at your desk, closing your laptop, getting in the car. If you have to remember the anchor, the stack has two failure points instead of none.
Match the anchor's context to the new habit
The anchor should leave you in the right place, at the right time, with the right things to hand. 'After I get into bed, I will do push-ups' fails on all three. 'After I put my shoes on, I will fill my water bottle' works because you are already standing by the door.
Make the first version absurdly small
Two pages, not a chapter. One push-up, not a workout. You are installing the trigger, not the outcome. The size can grow once the sequence fires reliably, and it will grow on its own — the hard part was ever starting.
Be specific about the end of the anchor
'After breakfast' is vague — breakfast ends at an unclear moment. 'After I put my plate in the dishwasher' is a precise instant. Precision is what makes the cue fire.
Only stack one new habit at a time
A chain of five new behaviours hanging off one anchor is not a stack, it is a morning routine you invented on paper. Get one link firing automatically before adding the next.
Turn this into an actual game
Habit Dungeon tracks the habits on this page and turns every completion into XP for a hero who raids a dungeon each night. Free for 7 days.
7-day free trial · iPhone · No ads
Worked examples by time of day
Steal these directly. The anchors are chosen because they are near-universal and have a clean, unambiguous end point.
After I turn off my alarm
…I will drink the glass of water I put on the nightstand last night.
After I pour my coffee
…I will write down the one thing that has to happen today.
After I brush my teeth in the morning
…I will take my vitamins, which live next to the toothbrush.
After I sit down at my desk
…I will close every tab that is not for the first task.
After I close my laptop for lunch
…I will walk around the block once.
After I finish a meeting
…I will write the one follow-up action before opening anything else.
After I take off my work shoes
…I will change into gym clothes immediately, before sitting down.
After I put the dinner plates in the dishwasher
…I will set out tomorrow's clothes.
After I plug my phone in to charge
…I will read two pages of the book on the nightstand.
After I get into bed
…I will write one line about the day.
Why stacks fail in week two
The anchor was not as reliable as you thought. This is the most common cause by a wide margin. 'After my morning run' is a terrible anchor if the morning run is itself the habit you are trying to build. Anchor to something boring and guaranteed — teeth, coffee, the front door.
The new habit was too big. A stack that requires twenty minutes will get skipped the first busy day, and one skip breaks the automaticity you were building. Two minutes survives busy days, and the two-minute version done on a bad day is worth far more than the twenty-minute version skipped.
The context was wrong. If the anchor leaves you in the kitchen and the habit requires your desk, you have inserted a gap, and the gap is where it dies.
You stacked onto a weekend-shaped anchor. Anchors tied to a workday routine silently disappear on Saturday. Either accept the stack is weekdays-only or pick an anchor that survives the weekend.
Something changed and you did not re-anchor. New job, new house, new baby, daylight savings. Stacks are attached to a specific life shape, and when the shape changes the stack detaches. This is normal and not a relapse — it just needs a new anchor.
Diagnosing a stack that stopped working
Find the symptom, apply the fix.
| Symptom | Likely cause | Fix |
|---|---|---|
| I keep forgetting entirely | The anchor is not automatic | Move to a more boring, more certain anchor |
| I remember but skip it | The habit is too big | Halve it, then halve it again |
| It works some days, not others | The anchor is schedule-dependent | Re-anchor to something that happens every day |
| I remember an hour later | Anchor has a vague end point | Pick a precise moment, not a period |
| It worked, then stopped after a change | Life shape changed | Re-anchor deliberately; this is not failure |
| I do it but resent it | Wrong habit, not wrong stack | Question whether you actually want this habit |
Habit stacking and identity
Stacking solves the mechanical problem of remembering. It does not solve the motivational one of why you would want to.
That is where the second half of the technique lives. James Clear's framing is that every action is a vote for a type of person, so the useful question is not 'what do I want to achieve' but 'who do I want to become'. Two pages a night is trivial as an outcome and significant as evidence: it is a vote for being a reader.
Stacking gives the vote a reliable time to be cast. Identity-based habits explains why the framing matters and how to pick an identity that is specific enough to act on.
How we built this into an app
We build Habit Dungeon, an iPhone habit tracker shaped like an RPG, and habit stacking is wired directly into it rather than being advice we published and moved on from.
Every habit can carry a cue — a time of day, a location, or an after X anchor pointing at another habit you already have. The app groups your day by those cues so the list you see is ordered by when things actually happen, not alphabetically.
There is also a voice route: talk for two minutes about what you want to change and it turns that into structured habits, inferring the schedule and the stacking anchor from what you said. 'I want to read more, probably before bed' becomes a habit anchored after your existing evening routine.
None of that is necessary to use habit stacking — a sticky note works. It is just what the technique looks like when a tracker takes it seriously.
Frequently asked questions
What is habit stacking?
Habit stacking is attaching a new habit to an existing automatic one using the formula: after [current habit], I will [new habit]. The existing habit acts as the cue, so you do not have to remember the new behaviour separately.
Who invented habit stacking?
The underlying technique comes from BJ Fogg's work on tiny habits at Stanford, where it is called anchoring. James Clear popularised the term habit stacking and the after/I will formula in Atomic Habits.
What are some habit stacking examples?
After I pour my coffee, I will write down today's priority. After I brush my teeth, I will take my vitamins. After I take off my work shoes, I will change into gym clothes. After I plug in my phone at night, I will read two pages.
Why is my habit stack not working?
Most often the anchor is not truly automatic, or the new habit is too big to survive a busy day. Check that your anchor happens every single day without you deciding to do it, and shrink the new habit until it takes under two minutes.
How many habits can I stack together?
Add one at a time. Long chains look efficient on paper but create a routine that collapses entirely if any single link is missed. Get one link firing without thinking about it before adding the next.
Is habit stacking backed by research?
The underlying mechanism — implementation intentions, meaning specific if/then plans tied to a concrete cue — is one of the better-replicated findings in behavioural science, with meta-analyses showing a reliable effect on follow-through. Habit stacking is a practical application of that.
Keep reading
- How to Build Good Habits That Survive a Bad WeekHow to build good habits using what the research actually supports — cues, small starts, identity and recovery from missed days. No 21-day myths.
- Identity-Based Habits: Becoming, Not AchievingIdentity-based habits explained — why 'I am a runner' outlasts 'I want to run a marathon', how to choose an identity, and where the idea gets misapplied.
- Never Miss TwiceThe never miss twice rule explained — why one missed day does not matter, why two do, and how to build a recovery plan before you need it.
- ADHD Habit Tracker: Choosing One That FitsWhat makes an ADHD habit tracker work — immediate rewards, zero setup, and forgiving streaks. Five options compared, plus what to avoid.