India is currently the world’s fastest-growing major economy. And before long, it may leapfrog the US on a ranking of the largest.

In a new report titled “The World in 2050,” consulting firm PwC projects that India’s GDP would exceed US GDP in purchasing power parity terms by 2040 (purchasing power parity accounts for the different prices levels across countries). This would make India the largest economy in the world after China.

Although India’s rapid population growth is part of what accounts for the forecasted jump ahead of the US, that is only part of the story. Drastic improvement in terms of per-person productivity due to capital investments and better technology will play an even more important role. PwC predicts that India’s economy will grow by about 4.9% per year from 2016 to 2050, with only 0.7% of that growth caused by population growth. India’s economy is currently the third-largest in the world, and is expanding at an estimated annual growth rate of 7.1% for the 2016-17 financial year.

Among the 32 largest economies in the world in 2016, only Vietnam is expected to grow faster per capita than India over the next three decades, PwC projects. With this growth, India’s economy would go from accounting for 7% of world GDP to 15%.

Though PwC expects India to make significant strides in converging the gap with rich nations like the United States and Japan, Indians won’t fully catch up with their American counterparts. In 2050, Indian GDP per capita would still be less than one third of that of the average American. There is a long way to go before Indian living standards rise to the levels of the world’s most prosperous countries but, despite short-term challenges like rising oil prices and demonetization, optimism for the long-term is warranted.