Couch potato lifestyles cost the health service more than £1 billion a year, research suggests.
The researchers say more should be done to help people be active
The Oxford University study calculated physical inactivity was directly responsible for 3% of all deaths and illness in 2002.
Writing in the Journal of Epidemiology and Community Health, the researchers said more needed to be done to help people be more active.
Heart experts said GPs could offer advice on how to start exercising.
The risks of not being active enough are well known, but only a third of men and a quarter of women are meeting government targets.
These say adults should take 30 minutes of moderate exercise five times a week, while children and young people should take 60 minutes.
The researchers calculated the amount of disease and early death attributable to physical inactivity, using information from the World Health Organization.
They focussed on coronary artery heart disease, stroke, breast and bowel cancers and diabetes, calculating the total number of deaths, illness, and disability associated with them in 2002.
They then used a calculation called the population attributable factor, which works out the proportion of disease which can be attributable to a particular risk factor - in this case inactivity - and applied this to the UK data.
Altogether, 287,206 people died from diseases associated with a lack of exercise in 2003/4, of which more than 35,000 were directly attributable to physical inactivity.
The direct cost to the NHS, including inpatient stays, outpatient appointments, drugs, community care, and visits to primary care practitioners amounted to £1.06 billion.
Of this, coronary heart disease accounted for £526 million.
But the researchers said the cost could be even higher as the estimates did not take into account additional costs such as lost productivity or informal care.
The team led by Dr Steven Allender of the department of public health at Oxford University, said: "We are not arguing that the findings of this paper change the importance given to achieving a reduction in the main risk factors for premature mortality such as smoking.
"We are arguing that the potential impact of changing other risk factors would be further enhanced if they were to include an increase in physical activity.
"There is an economic case for developing policies and interventions that promote physical activity."
Dr Allender added: "Activity needs to be a lot easier for people to fit into their everyday lives.
"For instance, we know a lot of people don't ride their bikes because of concerns over road safety and traffic density.
"At a more local level, things like social dances for older people make a big difference."
Steve Shaffelburg, of the British Heart Foundation, which is launching a campaign next month to encourage people to be more active, said: "This research is yet more evidence showing how important physical activity is for our overall health, and especially for our heart health.
"All adults should aim to take 30 minutes of moderate physical activity on five days a week at least. It can be enjoyable, cheap and easy to fit into everyday life. Brisk walking, swimming and gardening are great examples.
"You are never too old to start being active, but people who are not used to physical activity and not sure of what activity is right for them should discuss it with their GP."