Methods and devices involving using a bolus calculator to account for an uncertainty of a carbohydrate estimate to reduce a risk of hypoglycemia and a risk of hyperglycemia. More specifically, methods and devices using an algorithm executed by a processor of the bolus calculator and using a carbohydrate estimate and a measure defining the uncertainty of the carbohydrate estimate to determine the probability of hypoglycemia and hyperglycemia if the carbohydrate estimate is an overestimate or an underestimate, and subsequently providing recommendations and alerts to a user.