How to break a bad habit and replace it with a good one
A bad habit leaves a gap when you remove it. Fill that gap on purpose: keep the same cue, work out what the old habit gave you, and choose a new action that gives you some of the same thing.

Short answer: Keep the cue, change the action. Work out what the bad habit gives you (rest, comfort, energy, company), then choose a new action that gives you some of the same thing and that you can start in under a minute. Write it as an if-then plan and repeat it every time the cue shows up.
Most people try to break a bad habit by removing it. They stop the evening wine or the afternoon chocolate, and then sit there at 9 p.m. with the same tiredness and nothing to do with it. The old habit wins because it answers a real need.
Charles Duhigg called this the golden rule of habit change in The Power of Habit (2012): keep the old cue, deliver the old reward, and insert a new routine. You don't need the theory to use it. You need three answers, written down.
If you are still working out how to stop the habit at all, start with our guide on how to break a bad habit. This page is about the swap itself.
How to build the swap
- Write down the cueWhen does the habit start? Be exact: "when I sit on the sofa after dinner", "when a work email stresses me out", "when I get in the car". You'll keep this cue and give it a new answer.
- Name the payoffAsk what you would miss if the habit vanished tomorrow. Usually it's one of a short list: a break, a lift in energy, comfort after stress, something to do with your hands, a feeling of reward, time with other people.
- Test a few replacementsFor a week, try a different swap each time the cue shows up. Afterwards, notice whether the urge faded. If it did, that swap hits the same need.
- Make the swap easy to startThe replacement has to be closer than the old habit. Fruit on the counter, the book on the sofa, trainers by the door. If the new action takes five minutes to set up, the old one wins.
- Write the if-then plan"If I sit on the sofa after dinner, then I make a cup of herbal tea and put on a podcast." Put it where the cue happens, on a sticky note if needed.
- Track the swap, not the absenceTick each time you did the new action. A row of ticks is easier to feel good about than a count of things you didn't do.
12 swaps that match the payoff
| Old habit | What it gives you | Swap |
|---|---|---|
| Scrolling in bed | Winding down, switching off | Paper book or a 10-minute audiobook chapter |
| Afternoon chocolate | Energy and a pause | Short walk outside, then a piece of fruit |
| Fizzy drinks with lunch | Something cold and bubbly | Sparkling water with lemon |
| Evening wine on weeknights | A signal that work is over | A shower and a change of clothes, then a special tea |
| Smoking break at work | Fresh air, a chat, a reason to stop | Same break, same people, with a coffee or gum |
| Checking the phone at red lights | Filling a dead minute | Phone in the glove box, one slow breath per light |
| Nail biting while reading | Something to do with your hands | Hold a pen or a fidget toy |
| Takeaway after a long day | No decisions, quick food | A 10-minute "lazy meal" you keep ingredients for |
| Gaming until 2 a.m. | Fun, time with friends online | Same game with a fixed stop time and an alarm |
| Complaining to coworkers | Letting off steam, connection | Two minutes writing it out, then a different topic |
| Online shopping when bored | Novelty, a small thrill | Add to a wishlist and decide in 48 hours |
| Snooze button | Five more minutes of comfort | Alarm across the room and a warm drink ready |
These are starting points. Your payoff may differ from the one in the table, so your swap may differ too.
A good swap passes four tests
- Same place. You can do it where the cue happens. A gym session can't replace sofa snacking at 9 p.m.
- Fast to start. Under a minute from cue to action.
- Some of the same payoff. If the old habit was about rest, the swap has to feel restful, not virtuous.
- Small enough for a bad day. If you can't do it when you're exhausted, write a smaller version too.
A swap that fails one test is worth adjusting. One that fails three should be replaced with another idea from your test week.

Common mistakes
- Choosing a swap you think you should want. Replacing evening crisps with a 30-minute workout sounds good and lasts four days. Pick something you'd do on a tired Tuesday.
- Swapping without removing access. If the old habit is still one step away, it competes with the new one every night. Add friction to the old habit while you build the new one.
- Changing the cue and the action at once. Keep the cue the same while you learn the new action. Change one thing at a time.
- Calling the swap a failure after one slip. You will do the old habit sometimes. Count how often you did the swap this week compared with last week.
What the research says
Gollwitzer and Sheeran's 2006 meta-analysis of 94 studies found that if-then plans had a medium-to-large effect on reaching goals. Writing your swap as "if [cue], then [new action]" is that same tool. Wood, Quinn and Kashy (2002) found that about 43% of everyday actions happened almost daily in the same context, which is why keeping the cue and changing the response makes sense: the cue will keep showing up whether you plan for it or not.
What to do today
Write three lines on a card: the cue, the payoff, and your first swap. Put the card where the cue happens. Then set up the swap so it's ready: the water bottle filled, the book on the sofa, the alarm across the room.
In XP Tracker, the swap can become a quest of its own. Pick an add-on like Drink water or No sugary drinks from "+ Add a quest", and it starts tomorrow with its own streak. Finishing it earns XP that also damages the boss you're fighting. How the sugary drinks quest works.



Questions people ask
Why is replacing a habit easier than stopping it?
When you only stop, the cue still shows up and the need behind the habit is still there, so the old action fills the space. A planned replacement gives the cue a new answer, which is easier to repeat than doing nothing.
What if the replacement doesn't feel as good?
It usually won't at first. Aim for a swap that gives you part of the same payoff, then add a small reward of your own, like ticking it off or a song you only play during the swap. The new action tends to feel more normal after a few weeks.
How long until the new habit replaces the old one?
There's no fixed number. In a study of new daily habits (Lally et al., 2010), reaching automaticity took 18 to 254 days, with a median of 66. Expect the old habit to show up now and then for months, especially when you're tired or stressed.
Can I replace more than one bad habit at once?
You can, but start with one and give it two to four weeks. When the swap feels routine, add the next. Several new swaps at once means several new plans to keep in your head, and most people drop all of them.
Does habit stacking help with replacing a bad habit?
Yes, it's a close cousin. Habit stacking ties a new habit to something you already do. Replacing ties the new habit to the cue of a habit you want gone. Our habit stacking builder helps you write either kind.
Start your journey
Pick a class, do the day's quests, and watch your hero level up with you.
Start free on iPhone and Android.
Scan to install Point your phone camera at the code. iPhone opens the App Store, Android opens Google Play.



