This has been talked about way too often about how the world's population is bulging in the wrong spot but any avid blogger about world events should have at least one post pertaining to it.
Within the next 20-30 years Asia's population will become much too large for the job shift. In India for instance by the year 2025 there will be nearly 400 million people entering the labor force but there won't be enough jobs. A lot of them may be well educated but an even larger number of them will not have work in the forseeable future because the expanse of cities is becoming too large. Other developing nations such as Vietnam, the Philippines, and Indonesia will face similar problems to India in which the overall standard of living and general spread of education will increase but there still won't be enough capital or enough jobs to create a good market environment for these new laborers.
Then you have the more extreme case where the labor force is too young. Usually that is correlated to government instability and a lack of rural opportunities and hence poor farmers have more children in the hope that there will be more children to survive and provide for the family. The logic is highly flawed because there are more mouths to feed but because there are more mouths to feed, people become impatient and lash out at the government through a series of violent coups. African nations are experiencing this problem on a wide scale in North and Central Africa and less so towards the Southern part of the continent where environmental degradation is a bigger concern. Economic growth is pretty strong in these nations but the change is hardly noticeable as everyone seems to be caught in a poverty trap and there is very little industrialization taking place.
On the other side of the spectrum, some regions are growing too old and cannot generate growth because there won't be enough laborers. As a result there is a disproportionate amount of pensioners to taxpayers and that causes an unnecessary burden on the government and I am specifically talking about France, Germany, Italy, and other European nations that are bound to face this problem or are already facing this problem.
Well, I'm more interested in where the ideal age is for both political stability and economic growth. Nations such as Brazil, India, and China are all experiencing their best growth rates and are attracting global attention as these 4 economies are expected to become world powers in approximately 10-20 years give or take. India's median age is approximately 25, Brazil 27.2,and China is the oldest but strongest growing at 33. There is no perfect correlation as these countries have widely varying population sizes and urbanized population sizes too. China is able to support strong growth because of excess labor being controlled for some 30 years now. India is enjoying similar prospects and because its growth is not quite the same as China's right now, we can assume that the ideal median age is just around the corner. Brazil is an odd case because it's in between India and China in median age but does not have the same kind of growth levels as either country growing at a stable but not so fast rate of 5%. Some people will throw in Russia as an example of an old country prospering but not every country can profit from natural gas, oil, and other valuable resources in the same way Russia can and even Russia will start to find it burdensome because of a low labor force and a declining population.
My guess is that a nation is truly ready to expand its potential if its median age is younger than 30 and is not forseeable to change rapidly.