Public Health England is urging people over 30 to take an online test to find out their heart age, which indicates if they are at increased risk of suffering a heart attack or a stroke.

They predict about 80 percent of heart attacks and strokes in people under 75 could be prevented if heart health was improved, BBC reported.

Unhealthy lifestyles put four in five adults at risk of early death, they estimate.

People should quit smoking, eat a healthy diet and get enough exercise.

David Green, who is 59, took the test.

"The worst moment was being told my heart is 10 years older than me and that my life expectancy was shortened," he told the BBC.

"That took some digesting for sure, but I flipped it to a positive statement to do something to reverse that scenario."

David took the test after he struggled to keep up with rehearsals for his role in The Full Monty with his local theatre company in Plymouth.

He had never heard of heart age, but said he would have guessed he was only a few years off.

"I'm 59 now so I thought 'oh maybe it'll be 62 or 63', so a whole 10 years — that was a real shocker.

"They told me that 'you really need to do something otherwise you're not going to see that much of your pension'.

"I think that was the main thing for me, I'd just retired, I'd like to live a bit longer thank you very much."

Obesity, poor diet, a lack of exercise and high blood pressure are significant risk factors for the heart that can be changed.

How to improve your heart health:

● Give up smoking.

● Get active.

● Manage your weight.

● Eat more fiber.

● Cut down on saturated fat.

● Get your five a day fruit and vegetables.

● Cut down on salt.

● Eat fish.

Read labels on food and drink packaging

Almost two million people have taken the heart age test and 78 percent of participants have a heart age higher than their actual age. Of those, 34 percent were more than five years over their actual age and 14 percent at least 10 years higher.

More than 84,000 people die from a heart attack or stroke each year in England.

Matt Kearney, from NHS England, said the test has the ‘potential to help millions of people’.

The test is being backed by the British Heart Foundation and the Stroke Association.

Juliet Bouverie, chief executive at the Stroke Association, said: "We believe that across the UK there are around six million people who are undiagnosed and untreated for high blood pressure or atrial fibrillation, two of the biggest risk factors for stroke.

"However, treatment for these conditions can significantly reduce your risk of stroke and the devastation it causes."

The test asks 16 simple physical and lifestyle questions and gives an estimation of your heart age, and a prediction of the risk of having a heart attack or stroke by a certain age.

It also gives suggestions on lifestyle changes to help people reduce their heart age.

David joined the gym is eating much more healthily. He said taking control of his health and knowing what he's dealing with is very satisfying and empowering.

So far David has lost two stone and his BMI has come down by six points.

"I want to have a long and happy and healthy retirement and that's what it's about now — I've worked for 40 years continuously and I want to be enjoying things, I don't want to be hobbling around on a stick, which I could have easily been doing by now.