Everyone knows that exercising regularly is one of the keys to living a longer life. But if you’re over 40 and you’ve never been a big fan of the gym, you might think it’s too late to start. Well, good news: According to a new study published in the British Medical Journal (BMJ), becoming physically active in mid-life and beyond can add years to your life, regardless of your past activity (or lack thereof).

For their meta-analysis, researchers at the University of Cambridge, School of Clinical Medicine, looked at previous data on 14,599 men and women between the ages of 40 and 79. They assessed their physical activity levels at the beginning of the study, then three more times over the next seven years. They then compared this data to the mortality rates of the participants over the next 12 years.

The results showed that meeting the minimum recommended exercise guidelines—at least 150 minutes of moderate-intensity physical activity per week—was associated with a 46 percent decreased risk of premature death. And for those who had never exercised in the past, meeting these guidelines gradually over a period of five years was associated with a 29 percent lower risk of cardiovascular death, an 11 percent lower risk of cancer-related death, and a 24 percent lower risk of mortality overall.

“Middle aged and older adults, including those with cardiovascular disease and cancer, can gain substantial longevity benefits by becoming more physically active, irrespective of past physical activity levels and established risk factors,” the study concludes.

And if cardio isn’t your cup of tea, worry not: Research shows that you don’t necessarily have to do anything too strenuous to extend your life. One 2018 study published in the BMJ of men in their early 70s and late 80s found that doing sporadic bursts of light physical activity—walking the dog, mowing the lawn, etc.—was nearly as beneficial to longevity as a sweaty session at the gym.

And another recent study of 89,000 women over 50 found that walking for just 40 minutes several times per week reduces the risk of heart failure in post-menopausal women by a whopping 25 percent.

So, if you’re over 40, it’s hardly too late to get moving. In fact, doing so may just save your life. And if you need more inspiration to start getting active, check out Here’s How You Can Walk Your Way to a Longer Life.