The optimization of metabolic control in Type 1 and Type 2 diabetes mellitus (T1DM and T2DM, respectively) [i.e., the maintenance of near-normal hemoglobin A(1c) (HbA(1c)) without increasing the risk of hypoglycemia] could be enhanced by analysis of self-monitoring blood glucose (SMBG) data assessing complementary processes: exposure to hyperglycemia and hypoglycemia. We present algorithms that simultaneously estimate HbA(1)c and risk for significant hypoglycemia using 45-60 days of SMBG. The algorithms were developed using a primary data for 96 subjects with T1DM (n = 48) and T2DM, and were validated in an external data for 520 subjects with T1DM (n = 231) and T2DM. All subjects were on insulin. In the primary (external) data the estimation of HbA(1c) had absolute error of 0.5 (0.7) units of HbA(1c) and percent error of 6.8% (8.1%); 96% (96%) of all estimates were within 20% from reference HbA(1c). The SMBG-estimated value of HbA(1c) was closer to current reference HbA(1c) than a reference HbA(1c) value taken only 2-3 months ago. The results in T1DM and T2DM were similar. Linear model predicted future significant hypoglycemia (R(2) = 62%, p < 0.0001). The leading predictor was a previously introduced Low Blood Glucose Index, which alone had R(2) = 55%. Probability model assessed accurately the odds for future moderate/severe hypoglycemia (coefficients of determination 92%/94%). Four risk categories were identified; within moderate- and high-risk category, there was no difference between T1DM and T2DM in the occurrence of prospective significant hypoglycemia. SMBG data allow for accurate estimation of the two most important markers of metabolic control in T1DM and T2DM - HbA(1c) and risk for hypoglycemia.