Once you get into a fitness routine, you might worry about losing your progress if you take time off. However, taking a few days off from exercising is actually good for you and can help you reach your fitness goals in the long run.

On the other hand, taking too long of a break means you’ll start to lose the muscle and cardio fitness you’ve gained. How quickly this loss happens depends on several factors, including your pre-break fitness level.

In most cases, you won’t lose much strength if you take three to four weeks off, but you may start to lose your cardio endurance within a few days.

A loose definition of “athlete” is someone who has exercised five to six times a week for more than a year. In some cases, people who exercise just a few times a week but have been doing so for years are also considered athletes.

Muscle strength

Athletes can start to lose their muscle strength in about three weeks if they’re not working out, according to a 2013 study. Athletes typically lose less overall muscle strength during a break than nonathletes.

In general, you can take up to three or four weeks off without seeing a noticeable drop in your strength performance.

Cardio fitness

A recent study looked at 21 runners who participated in the 2016 Boston Marathon and then cut back on their exercise. They each went from running about 32 miles a week, to 3 or 4 miles a week. After four weeks of this reduced routine, the runners’ cardio fitness had dropped significantly.

The researchers noted that the runners would have seen larger declines had they stopped exercising completely. Running three or four miles a week helped them maintain some level of cardio fitness.

If you’re an athlete who has to cut back on your exercise because of time constraints or injury, keeping up a minimum level of activity could prevent you from losing all your cardio fitness.

If you don’t work out about five times a week or haven’t been exercising regularly for long, you probably fall into the nonathlete category.

Like athletes, you can take about three weeks off without seeing a noticeable drop in your muscle strength, according to a 2012 study. You shouldn’t take off longer than that if you can avoid it, though. Nonathletes are more likely than athletes to lose their progress during periods of inactivity.

The good news? A 2010 study found that both athletes and nonathletes can reach their peak fitness levels more quickly after a break, than when they first began training.

Our bodies are good at maintaining overall strength. If you take a few weeks off from exercising, your muscle strength won’t take much of a hit.

We know that skeletal muscular strength stays about the same during a month of not exercising. However, as mentioned above, athletes can start losing muscles after three weeks of inactivity.

You lose cardio, or aerobic, fitness more quickly than muscle strength, and this can start to happen in just a few days. According to a 2012 study in athletes, endurance decreases between 4 and 25 percent after a 3 to 4 week break in cardio. Beginners may find their aerobic fitness is back to zero after a four-week break.

Your age and sex can also play a role in how quickly you lose fitness.

As we age, it becomes increasingly harder to maintain muscle mass and strength. During a break, older people experience a bigger drop in fitness.

One study from 2000 grouped participants by age (20- to 30-year-olds, and 65- to 75-year-olds) and put them all through the same exercise routine and period of inactivity. During the six-month break, the older participants lost strength almost twice as fast as the younger ones.

The study found no significant differences in strength loss between men and women within the same age groups. However, the older women were the only ones to return to their baseline fitness level after the six-month break, meaning they had lost all their progress.

Menopause is most likely the cause for the loss of strength in the older female participants. A 2009 study found that it causes a decline in estrogen that decreases muscle mass and strength.

After taking a break from exercise, athletes are able to return to their former fitness levels more quickly than nonathletes, according to a 2010 study.

Athletes regain their former muscle strength more quickly because of muscle memory. A recent study suggests this occurs at the genetic level.

The researchers found that muscle growth is “remembered” by genes in the affected muscles. When you start training those muscles again, even after a long break, the genes respond more quickly than genes in previously unused muscles.

If you’re a nonathlete, you’ll also have muscle memory from previous activity, but your genes won’t be as quick to recall your former exercise if it wasn’t very consistent. You’ll still be able to get back to your former fitness level quicker than it took the first time around, but it will take longer than it does for an athlete.

The better shape you were in while training, the quicker you’ll be able to get back to that level.

Several factors affect how long it will take you to lose and regain your fitness levels if you take a break. It also depends on what kind of exercise you do.

You can step away from strength training for a longer time without seeing big setbacks. If you do endurance sports, like running or swimming, you’ll see a decline in your cardio fitness more quickly.

The bottom line is that taking a few days off, or even a few weeks in many cases, won’t seriously derail your progress. Remember, you’ll also be able to reach your peak fitness levels more quickly after a break than you did when you first began training.

If you need to cut back on your exercise but don’t have to stop completely, even a minimal amount of strength or cardio activity can prevent you from losing all your progress.

If you’re struggling to stay on track with a fitness plan, talking with a personal trainer can help. They can set you up with a plan that takes into consideration your lifestyle, fitness level, goals, and any injuries.

Finding the right routine can help you enjoy exercise and stick with it long-term.