Country's top 100 companies in terms of market valuation have generated a record Rs 38.9 lakh crore wealth in the last five years, with Tata Group firm TCS retaining the numero uno position on the chart for the fifth time in a row, says a latest study.

The IT giant was followed by private sector lender HDFC Bank (Rs 2.31 lakh crore), as per the study, which looks into top 100 wealth creating companies during the said five-year period.

Creating wealth worth about Rs 1.89 lakh crore, Reliance Industries muscled its way to the third spot after not featuring on the list in the previous study. ITC (Rs 1.59 lakh crore) and Maruti Suzuki (Rs 1.41 lakh crore) took the fourth and fifth rank on the list.

Overall, the top 100 companies created Rs 38.9 lakh crore during 2012 to 2017, which is the highest ever quantum of wealth created, Motilal Oswal said.

The study rank's the top 100 companies in descending order of absolute wealth created, subject to the company's stock price at least outperforming the benchmark BSE Sensex index.

Ajanta Pharma emerged as the fastest wealth creator for the third time in a row, with 2012 to 2017 stock price multiplier of 29 times (96 per cent CAGR).

"This reinforces the point that wealth creation happens in all kinds of market conditions. So, investors are better off focusing on which stocks to invest in, rather than timing the markets," the study said.

Sector-wise, banking and finance took the first spot as for creating wealth worth Rs 9.34 lakh crore, during 2012 to 2017.

Banking sector replaced consumer and retail industry, which emerged at the second place this time with wealth creation amounting to Rs 6.9 lakh crore.

At the same time, wealth worth Rs 6 lakh crore was destroyed during the five-year period, owing to cyclical downturn.

Metals/mining, trading, banking and finance, construction and real estate as well as utilities were the top five wealth destroying sectors.