Insulin is a hormone that allows the body to use carbohydrates for quick energy. This spares fat for long-term energy storage and protein for building muscle and regulating cellular processes. Without sufficient insulin many tissues, such as muscle, cannot use glucose, the product of digestion of carbohydrates, as a fuel. This leads to diabetes, a rise in blood sugar that damages organs. It also leads to heart disease, kidney failure, blindness, and finally, premature death. We use mathematics to study how the beta cells of the pancreas know how much glucose is available and how much insulin to secrete.