Irritable bowel syndrome (IBS) is the most prevalent functional gastrointestinal disorder (FGID) leading to substantial reduction in quality of life. This study was undertaken to assess the relationship between diet and prevalence of IBS in female adolescents. In this cross-sectional study, data were examined on 988 adolescent girls from different areas of Mashhad and Sabzevar cities, Iran. A 168-item validated and reliable food frequency questionnaire (FFQ) fordietary intake was used in all the study participants. A diagnosis of IBS was made using the Rome III criteria. Dietary macronutrients, energy, and selected micronutrients of IBS patients were similar to healthy subjects. Comparing the intake of caffeine between groups with and without IBS showed a higher level of consumption in the individuals with IBS (p-value = 0.02; p trend = 0.03). There was a significant positive association between caffeine intake and risk of IBS (odds ratio [OR] = 1.88, after adjustment for potential confounding variables). Although there was no significant difference in intakes of total dietary fiber (p-value = 0.23) and insoluble dietary fiber (p-value = 0.09) between IBS-positive and IBS-negative subjects, their soluble dietary fiber intake was significantly different (p-value = 0.02, a significant negative association was seen between soluble dietary fiber intake and IBS prevalence, after adjustment for potential confounding variables [p trend = 0.02; OR = 0.59]). The higher intake of caffeine was positively associated with IBS prevalence. Additionally, a negative association was seen between soluble dietary fiber intake and the chance of having IBS.