Objective To determine the median effective dose(ED50)and 95% effective dose(ED95)of remimazolam for gastroscopy when combined with propofol in pediatric patients of different ages.Methods This was a prospective study.American Society of Anesthesiologists Physical Status classificationⅠ or Ⅱ pediatric patients,aged 3-12 yr,who underwent painless gastroscopy in Hainan Women and Chil-dren's Medical Center from January to February 2024,were divided into the following groups:preschool group(3-6 yr)and school-age group(7-12 yr).Penehyclidine 0.01 mg/kg,afentanil 8 pg/kg and corre-sponding doses of remimazolam and propofol 1 mg/kg were intravenously injected,and gastroscopy was per-formed when the Modified Observer's Assessment of Alertness/Sedation Scale score)≤1.Up-and-down se-quential allocation was used.A positive response was defined as bucking,nausea,vomiting,body move-ment,and frowning occurred when the gastroscope entered the pharynx.The initial dose of remimazolam was 0.2 mg/kg,and the dose of remimazolam was increased/decreased by 0.02 mg/kg each time in the next pa-tient.Probit regression method was applied to calculate the ED50,ED95 and 95% confidence interval(CI)of remimazolam inhibiting responses to gastroscope placement when combined with propofol.The anesthesia-related adverse events were recorded.Results A total of 27 pediatric patients completed the trial in pre-school group and 26 cases in school-age group.The ED50 of remimazolam was 0.266 mg/kg(95% CI 0.249-0.285 mg/kg)and the ED95 was 0.302 mg/kg(95% CI 0.283-0.409 mg/kg)in preschool group.The ED50 of remimazolam was 0.16 mg/kg(95% CI 0.147-0.170 mg/kg)and ED95 was 0.183 mg/kg(95% CI 0.172-0.234 mg/kg)in school-age group.The ED50 and ED95 were significantly decreased in school-age group as compared with preschool group(P<0.05).During anesthesia,3 patients suffered hypotension(11% )in preschool group,and 3 patients suffered hypotension(12% ),2 patients suffered respiratory depression(8% ),2 patients suffered hiccup(8% ),1 patient suffered injection pain(4% )and 1 patient suffered muscle rigidity(4% )in school-age group.There was no significant difference in the incidence of adverse re-actions between the two groups(P>0.05).Conclusions When combined with propofol,the ED50 of remimazolam for gastroscopy in preschool and school-age pediatric patients is 0.266 mg/kg and 0.160 mg/kg,respectively,and the ED95 is 0.302 mg/kg and 0.183 mg/kg,respectively,indicating a stronger anes-thetic potency in school-age children.The probability of adverse reactions is low when the two are combined.