To compare gut microbiota of healthy infants that were exclusively breast-fed or formula-fed, we recruited 91 infants, who were assigned into three different groups and fed by breast milk (30 babies), formula A (30 babies) or formula B (31 babies) exclusively for more than 4 months after birth. Faecal bacterial composition was tested. Among different groups, α diversity was lower in breast-fed group than formula-fed groups in 40 days of age, but increased significantly in 6 months of age. The Bifidobacterium represented the most predominant genus and Enterobacteriaceae the second in all groups. In 40 days of age, Bifidobacterium and Bacteroides were significantly higher, while Streptococcus and Enterococcus were significantly lower in breast-fed group than they were in formula A-fed group. Lachnospiraceae was lower in breast-fed than formula B-fed group. Veillonella and Clostridioides were lower in breast-fed than formula-fed groups. In 3 months of age there were less Lachnospiraceae and Clostridioides in breast-fed group than formula-fed groups. There were also significant differences of microbiota between formula A-fed and formula B-fed groups. Those differences may have impacts on their long-term health.