India's BSE Sensex is 33% off its January highs. Foreign investors are fleeing the country, selling a net $5.9 billion in Indian shares. Inflation is at a 13-year high, and while GDP growth is strong, it's expected to slow through the rest of the year.

Only two months ago, analysts heralded India as the newest "miracle economy." Is its run already over?

Not so fast.

India's economic miracle
It's been just 16 years since India opened its economic borders to the world -- and the country's transformation has been staggering.

Foreign investment has increased by $83 billion since 1991. GDP growth has averaged 8.9% annually since 2003, and 400 of the world's largest 500 companies outsource middle-class jobs to India, up from 150 in 2000.

India has developed into a global back office, with service jobs accounting for more than half of the country's output, despite employing less than one-third of the country's labor force. Electronic Data Systems (NYSE:EDS) had 6,000 people apply for 110 job positions paying $3,000 annually -- a solid middle-class salary in India -- when it began hiring for call centers in Bangalore.

India's growing economy has even reversed the country's brain drain. Between 30,000 and 40,000 expats have returned to Bangalore alone, which serves enormous offshoring firms such as Wipro (NYSE:WIP) and Patni Computer Systems (NYSE:PTI).

Despite its late start to the game, India is determined to catch up. But the economic miracle for investors is not how far it's come, but how far it still has to go.

To infinity and beyond
Despite an economy growing faster than any but China's, a quarter of India's population is estimated to live below the poverty line. India graduates more engineers than the United States, but only 2% of the population has personal computers. The World Bank estimates that the Indian economy could quintuple in size -- if its existing mediocre firms close the gap with its best.

In other words, it's got a lot of room to grow. And every estimate suggests it will.

According to a study by the McKinsey Global Institute, India is expected to be the world's fifth-biggest consumer market by 2025, and the middle class will increase by a factor of 10: from 50 million to more than 500 million.

To a large extent, this will be driven by India's demographics. It has the world's youngest population, and the country's workforce is likely to grow by 350% by 2030.

And this growing workforce coincides with increased outsourcing -- according to McKinsey Global Institute, nearly 300,000 American jobs will move overseas annually over the next 30 years, for 9 million jobs in all.

Toto, we're not in China anymore
India's economic development is frequently compared to China's, but although both are moving vast numbers of their citizens toward the middle class, they have some significant differences.

Where China's boom has largely been in exports and manufacturing, India's has been in the less-capital-intensive services industry. India has a vibrant free market, while China's economy is still largely controlled by the state. But China got a head start -- India didn't emerge from exile until 13 years after the collapse of China's Cultural Revolution.

Step foot into an Olympic arena in Beijing, and you'll feel as though you're catching a glimpse of the future. Stroll down a New Delhi street, and you'll see flashes of the early 1900s before your eyes. China's infrastructure is stronger -- but I believe India's democracy will carry the day.

Not a global investor? Are you sure?
Just because you aren't invested in Infosys (NASDAQ:INFY) or Satyam (NYSE:SAY) doesn't mean you aren't invested in India.

IBM (NYSE:IBM) has 73,000 workers in India, and it plans to triple its investment in the next three years -- saving $168 million annually. General Electric (NYSE:GE) is in the process of moving 100,000 jobs to India. Morgan Stanley, Deutsche Bank, and UBS, among others, are all following in their wake.

So whether you know it or not, you're likely benefitting from the enormous growth of the Indian economy -- but you could be benefitting more.

At Motley Fool Global Gains, we've recommended two Indian companies that are positioned to profit from the growth of India's middle class. You can find out who they are -- and learn our best picks for new money now -- with a 30-day free trial. Click here to get started. There's no obligation to subscribe.

Kristin Graham , a contributing analyst for Global Gains, does not own shares in any of the companies mentioned in this article. Satyam is a Motley Fool Stock Advisor selection. The Fool has a disclosure policy.