Therapeutic food interventions have reduced mortality in children with severe acute malnutrition (SAM), but incomplete restoration of healthy growth remains a major problem1, 2. The relationships between the type of nutritional intervention, the gut microbiota, and therapeutic responses are unclear. In the current study, bacterial species whose proportional representation define a healthy gut microbiota as it assembles during the first two postnatal years were identified by applying a machine-learning-based approach to 16S ribosomal RNA data sets generated from monthly faecal samples obtained from birth onwards in a cohort of children living in an urban slum of Dhaka, Bangladesh, who exhibited consistently healthy growth. These age-discriminatory bacterial species were incorporated into a model that computes a ‘relative microbiota maturity index’ and ‘microbiota-for-age Z-score’ that compare postnatal assembly (defined here as maturation) of a child’s faecal microbiota relative to healthy children of similar chronologic age. The model was applied to twins and triplets (to test for associations of these indices with genetic and environmental factors, including diarrhoea), children with SAM enrolled in a randomized trial of two food interventions, and children with moderate acute malnutrition. Our results indicate that SAM is associated with significant relative microbiota immaturity that is only partially ameliorated following two widely used nutritional interventions. Immaturity is also evident in less severe forms of malnutrition and correlates with anthropometric measurements. Microbiota maturity indices provide a microbial measure of human postnatal development, a way of classifying malnourished states, and a parameter for judging therapeutic efficacy. More prolonged interventions with existing or new therapeutic foods and/or addition of gut microbes may be needed to achieve enduring repair of gut microbiota immaturity in childhood malnutrition and improve clinical outcomes.