Story highlights Lesotho, with a predicted life expectancy of 57.3 years, will have the lowest lifespan by 2040 among the 195 countries and territories analyzed in the report

Impacts of diseases such as diabetes, HIV/AIDS and cancers, as well as risk factors including diet and smoking rates were taken into account by researchers

(CNN) Spain will overtake Japan's long-held position at the top of the world's life expectancy table by 2040, while the United States is set to take a big fall in rankings, new research finds.

People in Spain will live for 85.8 years on average, marginally edging out expected lifespans in Japan (85.7), Singapore (85.4) and Switzerland (85.2).

The United States will take the biggest drop in ranking of all high-income countries, falling from 43rd in 2016 to 64th by 2040, with an average life expectancy of 79.8.

The US will be overtaken by China, which rises 29 places to 39th in the table.

Americans will live only 1.1 years longer on average in 2040 compared to 2016, well below the average global rise of 4.4 years over that same period.