Here’s a newsflash: Losing weight is hard. Here’s another one: Diets suck. Despite our best intentions, many of us struggle to shed those pesky pounds and keep them off for good. It’s hard to change your eating habits, work out enough, and resist temptation. And when you’re not seeing the results you hoped for, it’s really, really hard to stay motivated to keep trying. That’s the bad news.The good news is that science can help us discover why we fail over and over, and most importantly, what we need to do to stay on track and finally succeed.

While we like to think getting down to a healthy weight is something our bodies would want, the fact is, our physiology works against us much of the time.

Our bodies don’t like to shed pounds—they’ve evolved to equate fat burning with starvation, and see weight loss as a signal that times are lean. As we start to slim down, our brains flip the emergency switch to try and put lost pounds back on. To lose weight for good, you have to fight the natural protective mechanisms that your body puts in place until it adjusts to the new, healthier you.

From a purely physiological perspective, losing weight is simple.

You have to eat fewer calories than your body needs to consume for energy, thus making it switch to feeding off of your fat reserves. Ultimately, there are two ways to make this happen: 1. Decrease the number of calories you take in, or 2. Burn more calories in a day than before. Or, as they are more commonly referred to, diet and exercise.

“Never diet! Instead, make a lifestyle change that includes a plan for health.”-Kimberly Gomer, R.D.

But we don’t live in a purely physiological world. Not only are we fighting our own biology, but we’re surrounded by forces acting against our best intentions—too much stress, not enough sleep, too many delicious foods on the menu. When all of these hurdles to weight loss are lined up in front of us down the road, it can feel impossible to keep going.In the greater scheme of things, we don’t need the “right” diet or the “right” workout plan to get to our goals. We need the right motivation. Here are 6 ways to stay motivated, even when the going gets rough.

Ditch the diets.

I’ll let you in on a little secret: There is no such thing as the best diet. In one 2009 study, researchers tested low fat, low carb, and high protein diets head-to-head, and none of them stood out as the most effective. Though other studies have found some differences between one and another, at the end of this experiment, the scientists concluded that any type of calorie restriction—when paired with “enthusiasm and persistence”—helps people lose weight.So why do almost all of us that diet fail? “It’s the diet that fails the person—not the person who has failed the diet,” says Kimberly Gomer, R.D., Director of Nutrition at Pritikin Longevity Center and Spa. In fact, she says, “Never diet! Instead, make a lifestyle change. One that includes a plan for health.”Certified clinical nutritionist Marlyn Diaz agrees: “I think the biggest thing is that a lot of people do a structured diet plan, and they never learn how to live their life. They’re not really learning how to change their habits. They go back to their normal life after they’ve lost the weight, and it starts to creep up over time.”

Think longer term.

Weight loss from dieting is hard to maintain because we think of diets as short-term solutions. But that’s the wrong attitude, says Diaz. “[Losing weight] actually starts with the decision to commit to your health and to a healthy eating lifestyle as opposed to a diet.” Gomer concurs. “At Pritikin we don’t even call our plan a diet,” she says. “We promote a healthy lifestyle that includes all aspects of what people need to actually be healthy and vibrant. Exercise, sleep, emotional health, and yes, food, all are part of the program that will make you feel and look fantastic.”

It’s all about intrinsic motivations, ones that are self-based and not based on how others view you. The key is to really dig deep and figure out your real reason for wanting to lose weight.

Enlist a team.

That’s not to say structure is bad—to form good habits, you have to start somewhere. “I call them loving boundaries,” says Diaz. “You want some structure so that you can change your habits, and then you can loosen the reins up afterwards.” One of the ways you can set yourself up to succeed is to involve others who can hold you accountable and help to make sure you’re sticking to those “loving boundaries.” Scientists have found that checking in with someone, in person, helps maintain weight loss better than if you simply monitor yourself or join an online program. You can join a weight loss support group, or even just set one up with your friends where you meet once a week or month to swap stories, monitor progress, and provide each other with support to keep pushing through.

Find your “why.”

When we first try to lose weight, we’re often driven by immediate goals. Fitting into your wedding dress or looking hot at your high school reunion. But psychological research tells us that external reasons are not as meaningful or motivating as internal ones. It’s all about intrinsic motivations, ones that are self-based and not based on how others view you. The key is to really dig deep and figure out your real reason for wanting to lose weight. Diaz calls this “connecting to the ‘why’.” “You have a reason that is beyond just fitting into clothes,” she says. Maybe you want to have more energy, or be in better shape to keep up with your kids or grandkids. Once you identify it, write it down, so you can look back on it later and remind yourself what matters most to you.

Prepare for setbacks.

It’s important to remember that losing weight is a process—one that takes time. “We want to be thin overnight,” says Gomer. “A lifestyle change takes time. It took time to get the weight on—it will take time to get it off.” As time drags on, our perspective can easily shift from striving for a positive outcome (losing weight, being healthier), to avoiding a negative one (gaining weight back). We simply don’t want to go back to how we were. But in the same way that external motivations don’t work as well as intrinsic ones, negative goals don’t work as well as positive ones. Remembering our original goals can help prevent counterproductive negative thinking. “When people get off track I always tell them to go back to that why,” says Diaz.

Think like a winner—and brag like hell.

One way to shift that motivation back to a positive outlook is to focus on satisfaction with results and behaviors that have resulted in lost weight. Research finds that this kind of thinking goes a long way. Sharing personal success stories of weight loss and bragging about your accomplishments was shown in a 2011 study in the International Journal of Obesity to be as effective for weight maintenance as a program that focused on the skills of nutrition, diet and exercise. Reflect on how great you look and feel now, and all of the small successes you have had along the way. Talk about how awesome you are and how well you’re doing. In other words: Brag like hell.

MORE: The Best Ways to Motivate Yourself to Work Out

And keep it up—losing weight requires a lifelong lifestyle change, but it’s one that you’ll be able to feel good about forever. Eventually your new diet and exercise habits won’t be new or weird or hard anymore. They’ll just be part of the daily life of a happier, healthier you.