Scientists have collaborated with insurance companies to create a “death clock” that predicts when customers are going to die. The University of East Anglia, UK, is spending the next four years examining databases of medical data to determine life expectancy and long-term illness.

Related: Everything you need to know about probiotics

“We’ll be looking at the medical records of 3.4 million British citizens,” says lead researcher Elena Kulinskaya from UEA’s School of Computing Sciences. “Everything will of course be anonymous, but we will be able to see statistical life expectancy trends based on large-scale data collected over the long-term.”

As a result, scientists want to identify key factors affecting mortality and longevity, such as lifestyle choices, medical conditions and interventions. During the study, investigators will be focusing on chronic diseases and the impact of their treatments.

Related: New study reveals what makes someone creepy

“If you know how long you have left, you might decide to live your life differently, perhaps by spending your money in other ways, or making your health a bigger priority,” adds Kulinskaya. “We hope that people will feel empowered to make the best choices for their future, and it could even help them live longer.”

The study could also help doctors with decisions concerning drug prescriptions. Medical professionals will be able to compare the life expectancies of people on different medications, such as taking statins to reduce cholesterol.

“We’ve only just received the funding to do this work,” says Kulinskaya. “The next stage will be statistical modeling longevity, and uptake of various lifestyle changes and medical interventions, before implementing our findings into free available software.”