Glucose variability in a CGM series: what SD and CV measure

Glucose variability is how far glucose swings around its own average, and a continuous glucose monitor (CGM) records every swing. This guide computes SD and CV from coded readings, reads the AGP and sets time in range and CV against the 2019 international consensus targets.

Fig. 1. Fourteen days of glucose folded onto one day, against the 70–180 mg/dL target band.

A continuous glucose monitor (CGM) that reads every 5 minutes collects 288 values a day, or 4,032 over the 14 days the international consensus recommends for a report. Every metric in this guide is computed from that list. The glucose bands are counts, glycemic variability is a mean and a spread, and the ambulatory glucose profile (AGP) is a set of percentiles. The calculations are short, and their reliability depends on the input, so the guide covers the input first.

Checking the glucose series before computing metrics

Each reading needs four things before it can count: a value, a unit, a measurement time and a code that says what was measured. Kymolog™ files CGM values as Observations in FHIR R4, the current release of Fast Healthcare Interoperability Resources. Each one is coded LOINC 99504-3, glucose in interstitial fluid, with the unit mg/dL. It names its sensor by unique device identifier (UDI) as well.

Check two things before computing any metric. The first is coverage: the consensus asks for 14 days of data, with the sensor active at least 70 % of that time. That much data correlates strongly with three months of mean glucose and time in ranges. The second is gaps: a missing reading should stay missing rather than repeat the last value, because a gap counted as in range inflates every share in the next section.

Measurement times need the same care. Each value should carry the time the sensor measured it, not the time the record reached a server. A receiver that uploads an hour of backlog sends 12 readings at once, and Kymolog files each under its own measurement time, so the series keeps its true spacing.

Check the units as well. A series that mixes mg/dL and mmol/L gives a meaningless mean, and the UCUM code on each value lets a script catch that before it averages anything.

Glucose bands and their consensus targets

Calculating time in range

To compute time in range, count the readings from 70 to 180 mg/dL in the reporting period and divide by the total: 204 of 288 readings is 70.8 %. The same count over the other four bands gives time below range and time above range.

Bandmg/dLTarget, type 1 and type 2 diabetes
Very high (level 2)above 250under 5 % of readings
High (level 1)181–250with very high, under 25 % above 180
In range70–180over 70 %
Low (level 1)54–69with very low, under 4 % below 70
Very low (level 2)below 54under 1 %

The bands and targets come from the international consensus on time in range: Battelino and colleagues, Diabetes Care 2019. Two targets are cumulative. Below 70 mg/dL counts the low and very low bands together, and above 180 counts high and very high together. Set one band's own share against either target and a day looks closer to target than it is.

The consensus sets looser targets for older or high-risk adults: over 50 % in range, under 1 % below 70 and under 10 % above 250. Pregnancy uses a narrower range, 63–140 mg/dL. The panel also notes that each 5 % increase in time in range is associated with clinically significant benefits.

The consensus states each target twice, as a share of readings and as time per day: over 70 % in range is more than 16 hours and 48 minutes. The two match only when the sensor ran all day, so report the share of readings with the data coverage beside it.

Time in range, as the consensus bandsA synthetic day of CGM glucose for patient p-041: 288 readings, one every 5 minutes, each an Observation coded LOINC 99504-3 in mg/dL, drawn as a trace on recording paper with the consensus band limits at 54, 70, 180 and 250 mg/dL and the 70 to 180 range shaded. Beside it, a stacked bar of the share of readings in each band, with the consensus target for type 1 and type 2 diabetes: very high, >250 mg/dL, 12 readings, 4.2 %; high, 181–250 mg/dL, 63 readings, 21.9 %; in range, 70–180 mg/dL, 204 readings, 70.8 %; low, 54–69 mg/dL, 7 readings, 2.4 %; very low, <54 mg/dL, 2 readings, 0.7 %. Targets: very high under 5 %; above 180 in all (high and very high, here 26.0 %) under 25 %; in range over 70 %; below 70 in all (low and very low, here 3.1 %) under 4 %; very low under 1 %. Time in range, 70.8 %, is in red; it is the value LOINC 97510-2 records.ONE DAY, 288 READINGSSHARE OF READINGS5470180250mg/dL00:0006:0012:0018:0024:00Very high  >250  4.2 %target <5 %High  181–250  21.9 %above 180: 26.0 %, target <25 %In range  70–180  70.8 %target >70 % · LOINC 97510-2Low  54–69  2.4 %below 70: 3.1 %, target <4 %Very low  <54  0.7 %target <1 %
Time in range, as the consensus bandsA synthetic day of CGM glucose for patient p-041: 288 readings, one every 5 minutes, each an Observation coded LOINC 99504-3 in mg/dL, drawn as a trace on recording paper with the consensus band limits at 54, 70, 180 and 250 mg/dL and the 70 to 180 range shaded. Beside it, a stacked bar of the share of readings in each band, with the consensus target for type 1 and type 2 diabetes: very high, >250 mg/dL, 12 readings, 4.2 %; high, 181–250 mg/dL, 63 readings, 21.9 %; in range, 70–180 mg/dL, 204 readings, 70.8 %; low, 54–69 mg/dL, 7 readings, 2.4 %; very low, <54 mg/dL, 2 readings, 0.7 %. Targets: very high under 5 %; above 180 in all (high and very high, here 26.0 %) under 25 %; in range over 70 %; below 70 in all (low and very low, here 3.1 %) under 4 %; very low under 1 %. Time in range, 70.8 %, is in red; it is the value LOINC 97510-2 records.ONE DAY, 288 READINGS5470180250mg/dL00:0006:0012:0018:0024:00SHARE OF READINGSVery high  >250  4.2 %target <5 %High  181–250  21.9 %above 180: 26.0 %, target <25 %In range  70–180  70.8 %target >70 % · LOINC 97510-2Low  54–69  2.4 %below 70: 3.1 %, target <4 %Very low  <54  0.7 %target <1 %
Figure 2 as a table
Bandmg/dLReadingsShareTarget
Very high>250124.2 %<5 %
High181–2506321.9 %see above 180
Above 180, all>1807526.0 %<25 %
In range70–18020470.8 %>70 %
Below 70, all<7093.1 %<4 %
Low54–6972.4 %see below 70
Very low<5420.7 %<1 %
All readings288100 %
Fig. 2. Time in range is a count: the share of readings in each band. Of 288 readings in this synthetic day, 204 fall from 70 to 180 mg/dL, 70.8 %. The bands and targets are the international consensus for type 1 and type 2 diabetes, which reads them over 14 days of data.Bands and targets: Battelino T, Danne T, Bergenstal RM, et al. Clinical targets for continuous glucose monitoring data interpretation: recommendations from the international consensus on time in range. Diabetes Care 2019;42(8):1593–1603. doi:10.2337/dci19-0028

Glycemic variability: SD and CV

Glycemic variability, also called glucose variability, is the spread of readings around their mean. It is usually reported as two numbers, the SD and the CV.

Standard deviation

The standard deviation (SD) is in mg/dL. Subtract the mean from each reading, square the differences, add them up, divide by the number of readings minus one, and take the square root. For the twelve readings in Fig. 3 the mean is 156.0 mg/dL and the SD is 48.7 mg/dL.

SD tends to rise with mean glucose. An SD of 48.7 mg/dL around a mean of 156 describes a steadier day than the same SD around a mean of 110, so SD alone cannot compare two people.

Coefficient of variation

The coefficient of variation (CV) divides SD by the mean and states it as a percentage: 48.7 ÷ 156.0 × 100 = 31.2 %. Because it is relative to the mean, CV compares variability between people whose average glucose differs.

The consensus target is a CV of 36 % or less. It adds that some studies suggest a lower target, under 33 %, gives extra protection against hypoglycemia for people on insulin or sulfonylureas.

When you compute CV and SD from a study dataset, use the same period as the band shares, and say whether SD divided by n or by n − 1. Over 4,032 readings the choice barely moves the result; over twelve it moves SD by about 4 %.

Other measures of glucose variability

MAGE, the mean amplitude of glycemic excursions, takes another route. It averages only the swings from peak to nadir that are larger than one SD (Service and colleagues, Diabetes, 1970). It needs the full series in time order, which timestamped readings provide.

Glycemic variability, CV and SD, computed from coded readings12 CGM readings from one synthetic day, one every two hours from 00:00 to 22:00, each an Observation coded LOINC 99504-3 in mg/dL: 00:00 112, 02:00 96, 04:00 84, 06:00 131, 08:00 204, 10:00 178, 12:00 146, 14:00 192, 16:00 163, 18:00 121, 20:00 238, 22:00 207. A plot shows them with the mean, 156.0 mg/dL, and one standard deviation either side, 107.3 to 204.7 mg/dL. The arithmetic: mean = 1,872 / 12 = 156.0 mg/dL; the sum of squared deviations from the mean is 26,128; SD = the square root of 26,128 / (12 - 1) = 48.7 mg/dL; CV = 48.7 / 156.0 × 100 = 31.2 %, shown in red on a scale from 0 to 50 % against the consensus target of 36 % or less.CODED READINGSTIMEMG/DL00:0011202:009604:008406:0013108:0020410:0017812:0014614:0019216:0016318:0012120:0023822:00207each an Observation,LOINC 99504-3+1 SD 204.7mean 156.0-1 SD 107.300:0006:0012:0018:00n12 readingsmean1,872 / 12= 156.0 mg/dLSSsum of (x - mean) squared= 26,128SDsqrt(26,128 / (12 - 1))= 48.7 mg/dLCV48.7 / 156.0 × 100= 31.2 %CV AGAINST THE CONSENSUS TARGET01020304050≤36 % target31.2 %
Glycemic variability, CV and SD, computed from coded readings12 CGM readings from one synthetic day, one every two hours from 00:00 to 22:00, each an Observation coded LOINC 99504-3 in mg/dL: 00:00 112, 02:00 96, 04:00 84, 06:00 131, 08:00 204, 10:00 178, 12:00 146, 14:00 192, 16:00 163, 18:00 121, 20:00 238, 22:00 207. A plot shows them with the mean, 156.0 mg/dL, and one standard deviation either side, 107.3 to 204.7 mg/dL. The arithmetic: mean = 1,872 / 12 = 156.0 mg/dL; the sum of squared deviations from the mean is 26,128; SD = the square root of 26,128 / (12 - 1) = 48.7 mg/dL; CV = 48.7 / 156.0 × 100 = 31.2 %, shown in red on a scale from 0 to 50 % against the consensus target of 36 % or less.CODED READINGS, LOINC 99504-3TIMEMG/DLTIMEMG/DL00:0011212:0014602:009614:0019204:008416:0016306:0013118:0012108:0020420:0023810:0017822:00207+1 SDmean-1 SD00:0006:0012:0018:00n12 readingsmean1,872 / 12= 156.0 mg/dLSSsum of (x - mean) squared= 26,128SDsqrt(26,128 / (12 - 1))= 48.7 mg/dLCV48.7 / 156.0 × 100= 31.2 %CV AGAINST THE CONSENSUS TARGET01020304050≤36 % target31.2 %
Figure 3 as a table
StepWorkingResult
Readings00:00 112, 02:00 96, 04:00 84, 06:00 131, 08:00 204, 10:00 178, 12:00 146, 14:00 192, 16:00 163, 18:00 121, 20:00 238, 22:00 207n = 12
Mean1,872 / 12156.0 mg/dL
Sum of squared deviationssum of (reading - mean) squared26,128
SD (sample, n - 1)square root of 26,128 / 1148.7 mg/dL
CV48.7 / 156.0 × 10031.2 %
Consensus targetCV36 % or less
Fig. 3. Glycemic variability is arithmetic on the coded readings: SD is the spread around the mean, and CV is SD as a share of the mean, so it compares across patients. Twelve readings show the steps; a report runs them over every reading in 14 days.Target: Battelino T, Danne T, Bergenstal RM, et al. Clinical targets for continuous glucose monitoring data interpretation: recommendations from the international consensus on time in range. Diabetes Care 2019;42(8):1593–1603. doi:10.2337/dci19-0028

Bring a few days of CGM readings, or just the sensor class. The demo codes them as Observations and shows the study rows every metric here starts from.

Request a demo

Reading an ambulatory glucose profile

An ambulatory glucose profile folds 14 days of readings onto a single 24-hour day. At each time of day it plots the median of the readings taken then. Around the median sit two bands: the 25th to 75th percentile, and the wider 5th to 95th.

Building one from a coded series takes three steps. Group the readings by time of day across the 14 days, take the 5th, 25th, 50th, 75th and 95th percentiles of each slot, and draw the five curves.

The median shows the typical day, such as a rise after breakfast or a dip before dawn. The width of the bands shows variability at that hour: a wide band at 03:00 means glucose differs from night to night, even when each night's own trace looks stable.

The standardized AGP report puts this profile on one page with the core CGM metrics and their targets. These include the share of readings in each band, mean glucose, CV and the glucose management indicator (GMI), an estimate of A1C from mean glucose. The consensus recommends the AGP report as the template for CGM data.

Coding the results beside the readings

A computed metric is a result too, and LOINC has codes for the common ones. 97507-8 is average glucose in interstitial fluid over a reporting period, 97510-2 is the share of readings in range, and 97506-0 is GMI. The Kymolog CGM device type carries all three, so a summary can sit as an Observation next to the readings it came from.

Each summary and each reading names its sensor and its period, so a reviewer can recount any number in a report from the rows beneath it. The page on CGM data analysis shows how those readings are captured and filed in the EHR.

For the clinical side of a CGM study, such as A1C results drawn in the lab and insulin orders, Clinical Extract extracts the EHR's own records.

Before you report a CGM metric

  1. Count the days and the share of time the sensor was active: 14 days, at least 70 % active.
  2. Leave gaps empty, and report how many readings the period should have held against how many it did.
  3. Check that every value carries the same unit before averaging.
  4. Compute the band shares, SD and CV over the same period.
  5. State whether SD divided by n or n − 1, and which target set you compared against.

Bring a CGM dataset to a demo

Tell us which CGM sensors your patients wear and which EHR the site runs. We reply within one business day with times to talk. The demo turns 24 hours of sensor readings into coded rows and walks one metric through them.

Request a demo