Aim: This study aimed to establish a non-invasive, rapid, and cost-effective method to assess the potential risk of immune and psychiatric disorders by quantifying nan gene levels in gut microbiota, specifically focusing on Ruminococcus gnavus and other Lachnospiraceae species associated with mucin degradation. Methodology: We first designed a primer set targeting the consensus sequence of the nanA gene, which is highly conserved within nan gene clusters. To validate this primer set, we performed Next-Generation Sequencing (NGS) on the PCR-amplified fragments. To explore the association between nan levels and immune or psychiatric disorders, we conducted qPCR to quantify nan levels in the intestines, analyzing intestinal DNA from both allergy-induced mice with or without fructan treatment, and dogs with or without aggressive behavior. Additionally, to assess whether nan levels reflect the clinical status of immune disorders, fecal samples were collected from 45 patients with ulcerative colitis (UC) and analyzed for nan levels. Results: NGS analysis of DNA fragments amplified from various intestinal samples using the nan primer set confirmed the presence of nanA sequences from R. gnavus and other members of the Lachnospiraceae family, including Blautia and Dorea species. The qPCR quantification of nan levels using this primer set revealed that allergy-induced mice treated with fructans, which are known to be associated with lower allergy scores compared to untreated mice, exhibited significantly reduced nan levels. Additionally, the nan levels of aggressive dogs were substantially higher than those of non-aggressive dogs. Notably, nan levels were also substantially elevated in patients with UC in comparison to the healthy control individuals. Conclusion: qPCR-based measurement of nan levels in gut microbiota shows potential for selectively detecting pathogenic nan-harboring strains and may reflect the clinical status of immune and psychiatric disorders. This approach could provide a non-invasive, rapid, and cost-effective method for assessing the risk of these disorders.