A system for optimizing a patient's insulin dosage regimen over time, comprising at least a first memory for storing data inputs corresponding at least to one or more components in a patient's present insulin dosage regimen, and data inputs corresponding at least to the patient's blood-glucose-level measurements determined at a plurality of times, and a processor operatively connected to the at least first memory. The processor is programmed at least to determine from the data inputs corresponding to the patient's blood-glucose-level measurements determined at a plurality of times whether and by how much to vary at least one of the one or more components in the patient's present insulin dosage regimen in order to maintain the patient's future blood-glucose-level measurements within a predefined range.