You probably realize that consistency is important for making progress, doing better work, getting in shape, and achieving some level of success in most areas of life.

I write about the power of consistency often: why repetition is more important than perfection (here), how small gains add up to big results (here), and why falling in love with boredom is essential for mastery (here).

But once you realize the power of consistency, there is a danger that comes with this knowledge. And that danger is falling into an all-or-nothing mindset.

As usual, I don't have this all figured out, but let's talk about how to be consistent and how we can use science and research to avoid common mistakes and pitfalls.

Related: The Surprising Strategy One Man Used to Eliminate Procrastination

The All or Nothing Mindset

Once you realize that consistency is essential for success it can be easy to obsess over becoming flawlessly consistent.

For example...

  • Trying to lose weight? It's easy to convince yourself that if you don't follow your diet perfectly, then you've failed.
  • Want to meditate each day? Beware of focusing so much on never missing a day that you stress over sticking to your meditation schedule.
  • Looking to become a successful writer? You can quickly brainwash yourself into thinking that successful authors write every single day without fail. (The same goes for artists and athletes of all kinds.)

In other words, it's really easy to confuse being consistent with being perfect. And that is a problem because there is no safety margin for errors, mistakes, and emergencies. (You know, the type of things that make you a normal human being.)

Cutting yourself some slack becomes even more important when we consider the science behind habit formation and continual improvement. Research shows that, regardless of the habit that you are working to build, missing a single day has no measurable impact on your long-term success. (More on that here.)

In other words, it is all about average speed, not maximum speed. Daily failures are like red lights during a road trip. When you're driving a car, you'll come to a red light every now and then. But if you maintain a good average speed, you'll always make it to your destination despite the stops and delays along the way.

Related: What to Do When You Have Too Many Ideas and Not Enough Time

The Idea in Practice

My friend Josh Hillis is a fat-loss coach.

When working with clients, Josh doesn't even bother tracking their daily calories. He only looks at the calorie total at the end of each week and makes adjustments based on that.

Consider how different this strategy is from the typical nutritional approach. Josh doesn't care what you eat for any individual meal. He is not concerned if you make a mistake or binge eat once or twice. He realizes that individual meals don't matter if you maintain the right "average speed" over the course of the week.

I find this to be an empowering way to think about consistency and progress in nearly any area. It's never my intention to make a mistake, but if I do, I have given myself permission to view my progress over a longer timeline than a single day or an individual event.

How to Be Consistent: Plan For Failure

Consistency is essential for success in any area. There is no way to get around the fact that mastery requires a volume of work.

But if you want to maintain your sanity, reduce stress, and increase your odds of long-term success, then you need to plan for failure as well as focus on consistency. As I mentioned in my Habits Workshop, research from Stanford professor Kelly McGonigal has shown that the number one reason why willpower fades and people fail to remain consistent with their habits and goals is that they don't have a plan for dealing with failure.

Related: The Only Productivity Tip You'll Ever Need

Planning to fail doesn't mean that you expect to fail, but rather than you know what you will do and how you will get back on track when things don't work out. If you're focused on being perfect, then you're caught in an all-or-nothing trap.

Meanwhile, if you realize that individual failures have little impact on your long-term success, then you can more easily rebound from failures and setbacks. Being consistent is not the same as being perfect.

A version of this article first appeared on JamesClear.com.