
The Science Behind Building Habits: Habit Stacking & Context Dependencies
Key Takeaways
- Your environment and existing routines play a significant role in shaping your habits. Keeping your surroundings consistent while building a habit helps make it automatic.
- Habit stacking makes new habits easier to adopt. By linking a new habit to an existing one, you reduce the cognitive effort required to establish it, increasing the likelihood of long-term success.
- On average, it takes about 66 days to form a habit, so consistency and self-compassion are essential in the process.
Forming new habits isn’t always easy, but understanding the science behind habit formation can make a big difference. We recently discussed why setting realistic resolutions matters, and the next step is figuring out how to stick to them. Since forming a new habit takes an average of 66 days, let’s explore the best ways to integrate these new goals into our daily routines (Lally et al., 2009).

How habits form in the brain
To develop a habit, your brain has to take the intentional, voluntary actions you make and transform them into automatic behaviors. When an action becomes a habit, it requires less cognitive effort due to the distinct roles of the cortex and the basal ganglia and a shift in the neural pathways between them. The remarkable plasticity of the connections in our brain allows for us to change how we process behaviors (Mendelsohn, 2020).
So, how do we shift the way our brain is wired? We create habits through repetition, and according to decades of behavioral research, successful habit forming also relies on context cues (Gardner et al., 2012). By repeating actions in consistent contexts, we provide our brains with cues to do those actions. Cues can be anything from your emotional state to a physical sensation. Common context cues include location, preceding action, and time of day.
Let’s consider your “leave the house” routine. Without even thinking about it, you likely run through a mental checklist: Do I have my keys? My phone? My wallet?
Now, imagine you’re on vacation. One of two things might happen:
- Location cue: The act of standing in the doorway of your hotel room triggers the same familiar context cues as you have at home, keeping your “leave the house” routine intact—just like how you instinctively wash your hands, no matter which bathroom you’re in.
- Object interaction: If your cue is tied to something specific in your home—like a bowl by the door where you always place your keys—you might find yourself at the hotel reception desk asking for a new key every day because that object-based cue no longer exists in your new environment.
Context like your surrounding environment is key for building habits. When you do something in the same setting, it's more likely to become automatic. Research shows that keeping your surroundings consistent while building a habit makes it more automatic and helps you reach your goals (Stojanovic et al, 2022).
We likely all already have habits we have created, so what if we could use them to our advantage?

The power of habit stacking
Habit stacking is a technique that involves linking a new habit to an existing one, using the established habit as a cue for the new behavior. This concept was made famous by James Clear in his book Atomic Habits: An Easy and Proven Way to Build Good Habits and Break Bad Ones and by behavioral scientist Dr. BJ Fogg in his book Tiny Habits.
This method leverages the existing neural pathways associated with the established habit, making it easier to incorporate the new behavior. For example, if you have a well-established habit of making tea every morning, you can stack a new habit of taking your vitamins immediately after making your tea—going so far as to put them next to the kettle in your kitchen. This association helps create a mental link between the two activities, potentially making it even easier to form a new habit.
While it’s by no means easy, research supports the efficiency of habit stacking in forming new habits. By anchoring a new behavior to an existing routine, individuals can reduce the cognitive load required to initiate the new habit, thereby increasing the likelihood of its adoption (Clear, 2020).

How to apply habit stacking in real-life situations
- Identify an existing habit: Choose a stable habit that you perform consistently.
- Select a new habit: Determine the new behavior you wish to adopt.
- Stack the habits: Plan to perform the new habit immediately after the existing one. Ideally, these are two habits that make sense to be done together or in immediate succession, making it easier for you to link the two habits together.
- Practice consistently: Repeat the combined routine regularly to strengthen the association.
For instance, if your goal for 2025 is to finally start meditating and you already have a habit of brushing your teeth in the morning, you can decide to meditate right after brushing your teeth. Over time, brushing your teeth will serve as a cue to meditate, making the new habit a seamless part of your routine.
Understanding how to form and stack habits can make it easier to integrate new behaviors into your daily routine. It takes commitment—about 66 days on average—for an action to become a habit that doesn’t require thought. Odds are good you’re going to miss days here and there, so be kind to yourself and recognize those missed days as part of the process. What matters is that you keep going, so stay consistent and give it your all. We’re cheering you on!