In June 1993 the median age was 32.
Population projections show half of all Kiwis will be older than 39.9 by 2031.
The median age is higher for women (38.4) than for men (35.8), which reflects women's longer life expectancy.
Over 65s now make up 14 per cent of the population, up from 11 per cent in 1993.
The number of over 65s has doubled since the early 1980s, and is likely to double again by 2040.
Meanwhile children - those aged up to 14 - make up 20 per cent of the population, down from 23 per cent since 1993.
Population growth in the year to June was due to natural increase - 29,800 more births than deaths - and net migration of 7900.
Natural population increase is dropping, due to a decreasing number of births. The natural increase in the year to June was the lowest since 2005.
The 2013 population estimates were calculated using 2006 census data, adjusted according to numbers of deaths, births and net migration.
Data from the 2013 census is still being calculated.