The diagnosis of inflammatory bowel disease (IBD) worldwide is complicated and results in diagnostic delay. However, the diagnostic interval of IBD and the factors associated with diagnostic delay in patients in China have not been determined. We retrospectively analyzed clinical data of hospitalized IBD patients in Peking Union Medical College Hospital from January 1998 to January 2018. Patients were divided into non-delayed and delayed groups according to their diagnostic interval. A total of 516 and 848 patients were confirmed to have Crohn's disease (CD) and ulcerative colitis (UC), respectively. The median diagnostic intervals were 6 and 20 months in patients with UC and CD, respectively (P<0.05). A decreasing trend in the diagnostic interval for IBD was observed over time, from 9 months to 1 month in UC patients and from 30 months to 3 months in CD patients. The longest diagnostic interval was 29.5 months in CD patients with first symptoms at the age of 51-60 years and 12.5 months in UC patients at the age of 41-50 years. In patients with CD, intestinal obstruction (OR=2.71), comorbid diabetes (OR=4.42), and appendectomy history (OR=2.18) were risk factors for diagnostic delay, whereas having fever as the first symptom may reduce its risk (OR=0.39). In patients with UC, the misdiagnosis of chronic enteritis (OR=2.10) was a risk factor for diagnostic delay. The diagnostic interval for IBD has decreased over the years. Some clinical manifestations, such as initial symptoms and age at symptom onset, may help to shorten this interval. Diseases such as tuberculosis and infectious enteritis should be considered during differentiation.