Human milk oligosaccharides (HMOs), though non-nutritive to the infant, shape the intestinal microbiota and protect against pathogens during early growth and development. Infant formulas with added galacto-oligosaccharides have been developed to mimic the beneficial effects of HMOs. Premature infants have an immature immune system and a leaky gut and are thus highly susceptible to opportunistic infections. A method employing nanoflow liquid chromatography time-of-flight mass spectrometry (MS) is presented to simultaneously identify and quantify HMOs in the feces and urine of infants, of which 75 HMOs have previously been fully structurally elucidated. Matrix-assisted laser desorption/ionization Fourier transform ion cyclotron resonance MS was employed for high-resolution and rapid compositional profiling. To demonstrate this novel method, samples from mother-infant dyads as well as samples from infants receiving infant formula fortified with dietary galacto-oligosaccharides or probiotic bifidobacteria were analyzed. Ingested oligosaccharides are demonstrated in high abundance in the infant feces and urine. While the method was developed to examine specimens from preterm infants, it is of general utility and can be used to monitor oligosaccharide consumption and utilization in term infants, children, and adults. This method may therefore provide diagnostic and therapeutic opportunities.