When did india get its independence from the British?
India gained its independence in 1947.
By 1900, the British Raj had united the Indian subcontinent to a degree never experienced before -- from Baluchistan in what is now West Pakistan to Burma; and Ceylon to Nepal. However, the peoples of this patchwork of possessions, client states, and other entities spoke dozens of different languages and practiced many different religions. Governing this was not easy and fairness came second to keeping order.
The British administration led to the growth of an educated Middle Class who could spot the many inequalities in the system, and kindled a growing nationalism. As the peoples of India also contributed to Britain's wars (particularly the First World War) a sense of entitlement also grew. At the same time, the administration of a vast empire was costing Britain more and more, and yielding less and less in profit as the world's economies changed over the decades.
What really brought affairs to a head was the Second World War. The August 1941 Atlantic Charter drafted by the US and UK recognized freedom as a major aim for the Allied War effort. The peoples of Asia and Africa -- who were seeing the confidence of their Imperial rulers shaken by the War -- also realized that the 19th Century Imperial system was no longer justifiable or sustainable.
Moreover, the British Raj made major contributions towards the Allied War effort - 2.5 million troops served on many fronts (although India's nationalists opposed the war effort).
The Post-War British government bowed to the inevitable and passed the Independence of India Act in 1947. Burma, Ceylon and Nepal were already going their own way, and Muslim Nationalists had agitated for their own state of Pakistan and what is now Bangladesh. Most of the rest became India.