Background: The mean amplitude of glycemic excursions (MAGE), traditionally estimated with a graphical approach, is often used to characterize glycemic variability. Here, we tested a proposed software program for calculating MAGE. Methods: Development and testing of the software was based on retrospective analyses of 72-h continuous glucose monitoring profile data collected during two different clinical studies involving 474 outpatients (458 with type 2 and 16 with type 1 diabetes) in three cohorts (two type 2 diabetes and one type 1 diabetes), using the CGMS (R) Gold (TM) (Medtronic MiniMed, Northridge, CA). Correlation analyses and a Bland-Altman procedure were used to compare the results of MAGE calculations performed using the developed computer program (MAGE(C)) and the original method (MAGE(O)). Results: Close linear correlations between MAGE(C) and MAGE(O) were documented in the two type 2 and the type 1 diabetes cohorts (r = 0.954, 0.962, and 0.951, respectively; P < 0.00001 for all), as was the absence of any systematic error between the two calculation methods. Comparison of the two indices revealed no within-group differences but did show differences among the various antihyperglycemic treatments (P < 0.0001). In each of the study cohorts, MAGEC correlated strongly with the SD (r = 0.914-0.943), moderately with the mean of daily differences (r = 0.688-0.757), and weakly with glycosylated hemoglobin A1c and mean sensor glucose (r = 0.285 and r = 0.473, respectively). Conclusions: The proposed computerized calculation of MAGE is a practicable method that may provide an efficient tool for assessing glycemic variability.