Premature deaths, treatment for the sick, wasted time and productivity, as well as lost tourism revenues, are the main reasons for the high economic losses, the bank said in a report.
"For decades, we have been aware of the significant impacts of inadequate sanitation in India," Christopher Juan Costain, the World Bank's head for South Asia's water and sanitation programme, said.
"The report quantifies the economic losses to India, and shows children and poor households bear the brunt of poor sanitation."
The study is based on figures taken from 2006, but experts say these remain similar now. It said the largest economic loss was as a result of poor public health.
World Bank experts say there are 450,000 deaths out of 575 million cases of diarrhoea in every year in India, where millions of people in both rural and urban areas still have to defecate in the open, do not wash their hands and cope with poor drainage systems.
The premature deaths, treatment of the sick for illnesses such as diarrhoea, malaria, trachoma and intestinal worms, as well as the time lost due to illness is costing 24.8bn alone. A further 6.8 million is lost in "access time", the report said - time spent looking to access a shared toilet or open defecation site compared to having a toilet in one's own home.
Tourism revenues suffered from the lack of proper sanitation and costing the country about 167.4m, Mr Costain said.