If you fear you’re doing irreparable damage to your body because your white-collar job keeps you sitting at your desk from 9 to 5, or you regularly spend entire weekends sprawled out on your couch binge-watching Netflix, there’s some good news just out from sports medicine researchers.

According to a study published in the Lancet, all is not lost. You may be able to make up for your increased risk of death due to a sedentary lifestyle by engaging in enough physical activity.

So just how much is enough? The first thing you need to know is that it’s not a fixed number but based on a ratio that depends on the amount of sitting you do daily. If you sit four hours a day, you need to do at least 30 minutes of exercise. An eight-hour work day of sitting means one hour of exercise.

The numbers come from an analysis based on a very large pool of people, about 1 million adults, 45 and older, from the United States, Western Europe and Australia. The findings show a risk reduction — or even elimination — for your risk of death from heart disease, diabetes and some cancers.

Researcher Ulf Ekelund, a professor at the Norwegian School of Sports Sciences, suggested that the one hour of activity could be brisk walking or cycling but said that the exercise doesn’t have to be so rigorous or all at one time. That is, the hour of activity can be spread out over the entire day.

“We did not analyze your data in this way, but all available evidence suggests that the one hour can be done in shorter intervals. My personal opinion is that every single minute of activity counts,” he said in an email.

Physical inactivity is now considered to be a serious health problem affecting much of the world. Lars Bo Andersen of the University of Southern Denmark argues that things are so bad that it has become a global pandemic. Researchers estimate that it cost health-care systems $53.8 billion worldwide in 2013 — with most of the economic burden in high-income countries and most of the disease in low-to-middle-income countries. This includes direct health-care costs for things such as heart disease, stroke and breast cancer as well as estimates of the loss of productivity.

Ekelund’s analysis looked at information from 16 previous studies and classified participants into four groups depending on their activity level. Those in the least-active bucket were active less than five minutes a day, while those who were most active exercised 60 to 75 minutes a day.

The findings suggest that the person who sits longer isn’t necessarily worse off: Those who sat for eight hours a day but were physically active were better off in terms of risk of death than those who sat for fewer hours but were not physically active.

The ideal amount of exercise people should do has been a source of heated debate in recent years. Fitness-band companies have pushed 10,000 steps a day as a goal. The World Health Organization recommends at least 150 minutes of activity a week. The American Heart Association recommends 30 minutes a day.

This study is the latest to recommend a higher threshold for the minimum amount of exercise.

Another prominent study, published last October in the journal Circulation, argued that physical activity and heart failure may be “dose dependent,” with higher levels of physical activity lowering the risk proportionally.

Too busy to commit to that much exercise? Some evidence suggests that “microbursts” of extremely intense exercise to get your heart rate up to 90 percent of its maximum may help, although it’s unclear exactly how that high-intensity interval training, or HIIT, compares to traditional activity.

Despite the seemingly daunting conclusion that couch potatoes need to exercise even more than was thought, Ekelund thinks the message from his study is a positive one: that it’s possible to reduce or even eliminate the risk of a mostly sedentary lifestyle if people become more active.

Practically speaking, that means 30 minutes of moderate activity per day may be fine for some people, but it’s a different story for the legions of modern-day commuters with office-based jobs.

“The current public health recommendations for physical activity are based on very solid evidence and our data support these. … However, if you sit for many hours a day (i.e. > 8 hours) you need to do at least one hour of moderate activity every day to offset the association between sitting time and mortality,” Ekelund wrote.

There was one important catch in the study, however. Researchers also ran the same analysis for TV watching and mortality. They found that people who watched television three or more hours per day (presumably while sitting rather than being on, say, a treadmill) had a higher risk of mortality for nearly every amount of physical activity except for those in the highest quartile. But even these super-active people could tolerate only so much TV time. Those watching television five hours a day or more still appeared to have a significantly increased risk of death compared with those watching little TV, regardless of the amount of physical activity. This implies that watching TV while sitting may somehow be worse for your health than doing a different type of task while sitting, and it’s something that researchers find perplexing, underscoring how much we still don’t know about how we move impacts how long we live.

This post has been updated.

Read more:

Like our Health & Wellness page on Facebook for more science news about the ins and outs of the human body and mind, essays and advice. You can sign up here for our newsletter.