Regular exercise can boost cardiovascular endurance, build muscle strength, and improve flexibility.

But only if you stick with it.

“When we stop exercising, we lose those benefits, and depending on the length of time we abstain, we can reverse them entirely,” Brian Housle, senior exercise physiologist at the Duke Diet and Fitness Center, told Healthline.

Research shows that it doesn’t take that long, either, for your fitness to suffer.

We’re talking weeks, not months.

While this may not be the most welcome news if you’ve missed a couple days at the gym, understanding what happens when you skip your workouts might just motivate you to get active again.

Read more: How long does it take to get in shape? »

Aerobic fitness first to go

A small study presented last month at the European Congress on Obesity found that just two weeks of reduced physical activity can reduce muscle mass and lead to unhealthy changes in the body.

Researchers asked 28 healthy, young, physically active people to cut back on their physical activity by more than 80 percent for two weeks.

Volunteers wore a physical activity monitor to make sure they were as inactive as they were supposed to be.

The result?

Cardiovascular fitness and muscle mass both dropped. Body fat increased. And people were unable to run as long or as intensely as they did two weeks earlier.

The results, though, should be treated with caution because the study has not been published in a peer-reviewed journal.

But it fits with other research on the health effects of stopping exercise — also known as “detraining.”

Studies have found that when you stop moving, cardiovascular fitness is the first to suffer.

“Three weeks is the ‘tipping point’ where aerobic training levels begin to decrease with detraining,” said Housle.

With prolonged inactivity, the body reverses many of the changes that happened with exercise.

It makes fewer capillaries to carry blood to the muscles and fewer mitochondria, the “powerhouses” of the cell. There is also a decrease in the amount of blood pumped by the heart.

And there is a decline in VO2 max — the maximum amount of oxygen that your body can use. This is often used as a measure of endurance performance.

“Some studies have shown as much as 10 percent reduction [in VO2 max] in less than two weeks for individuals who are highly trained, and ranging up to 15 percent in six weeks,” said Housle.

Read more: Exercise benefits children physically and mentally »

Muscle strength drops

Next to go is muscle mass and strength.

In a 2013 analysis of 103 other studies, published in the Scandinavian Journal of Medicine & Science in Sports, researchers looked at how soon muscle strength decreased after people stopped exercising.

“From a statistical perspective, a significant decrease was observed after three to four weeks of training cessation,” Nicolas Berryman, PhD, a study author, and an assistant professor of sports studies at Bishop’s University in Quebec, told Healthline.

“This is true for all aspects of muscular strength,” he added, “whether it’s maximal force, maximal power, or submaximal strength.”

Some people, though, were impacted more.

“If you’re an older adult, you’re more at risk of being negatively affected by training cessation,” said Berryman.

People over 65 years saw larger decreases in all three types of muscle strength.

A person’s baseline fitness also played a role in how they responded to training cessation.

“If you were completely sedentary, and you started training for two months and then you stopped, you’re going to be more affected than a trained athlete,” said Berryman.

The studies that Berryman and his colleagues included in their analysis didn’t look at whether people stayed physically active in other ways when they weren’t training.

But there are likely to be differences between a person laid up in bed for weeks because of an injury or surgery, compared with someone swimming, hiking, or dancing while on vacation.

“Depending on the amount of inactivity you engage in once the exercise stops, decreases can occur more rapidly,” said Housle.

Staying active, even if you aren’t hitting the gym every day, will also help keep off unwanted pounds.

And you will maintain the exercise habit.

“By sustaining some consistent routine for exercise,” said Housle, “the odds of returning to an established schedule for exercise will be easier to do.”

Read more: How exercise helps you lose weight »

Boosting motivation

Sometimes you can’t avoid missing your workouts, whether it’s due to injury, illness, work, or family.

But if you’re stuck in a cycle of starting a new exercise program only to give up after a few months or weeks, you may need a motivation boost.

With the right motivation, you will happily get up early every morning to go for a long run, or head to the gym even when all your friends are at happy hour.

This is what Michelle Segar, PhD, MPH, calls “high-quality stable motivation.” Without it, you’ll never stick to your workouts.

This type of motivation, though, doesn’t come from feeling pressured to do the right thing. You need a better “why” — as Segar calls it — to start exercising or keep coming back.

“Your primary reason [for exercising] needs to reflect something that is deeply meaningful — in reality and not just theory,” Segar, director of the University of Michigan's Sport, Health and Activity Research and Policy Center, and the author of “No Sweat,” told Healthline.

Exercise should also be something you enjoy doing or that makes you feel good.

In a recent study in the journal BMC Public Health, Segar and her colleagues found that many women with low levels of exercise had beliefs about exercise that conflicted with the things that make them feel happy and successful.

This type of conflict can harm their exercise motivation. For these women, though, more willpower isn’t the answer.

“Willpower is a resource that depletes with use so it's not really a great way to keep up exercising,” said Segar. “Each woman has to discover her own ‘why’ and ‘way’ to move that fits who she is and her life context.”

For Marnie Oursler, star of the new DIY Network show “Big Beach Builds,” her ‘way’ includes scheduling exercise into her busy day like a meeting — and being flexible about exercising.

On busy days, this might mean a quick workout video. And when she travels, looking for a pool or gym to go to. Or just finding a place to walk, even if only for 30 minutes.

All of this helps her connect with her ‘Why.’

“I feel better when I exercise,” said Oursler. “It is a way for me to decompress and forget about the problems. It gives me a chance to refocus on what really matters. When I miss my workouts, I get stressed out!”

Read more: What exercises are the best? »