A meal detection and meal-size estimation algorithm is developed for use in artificial pancreas (AP) control systems for people with type 1 diabetes. The algorithm detects the consumption of a meal and estimates its carbohydrate (CHO) amount to determine the appropriate dose of insulin bolus for a meal. It can be used in AP systems without manual meal announcements, or as a safety feature for people who may forget entering meal information manually. Using qualitative representation of the filtered continuous glucose monitor signal, a time period labeled as meal flag is identified. At every sampling time during this time period, a fuzzy system estimates the amount of CHO. Meal size estimator uses both glucose sensor and insulin data. Meal insulin bolus is based on estimated CHO. The algorithm does not change the basal insulin rate. Thirty in silico subjects of the UVa/Padova simulator are used to illustrate the performance of the algorithm. For the evaluation dataset, the sensitivity and false positives detection rates are 91.3% and 9.3%, respectively, the absolute error in CHO estimation is 23.1%, the mean blood glucose level is 142 mg/dl, and glucose concentration stays in target range (70-180 mg/dl) for 76.8% of simulation duration on average.