To calculate the SMA, you take the average of a set number of data points. For example, if you are analyzing weekly case numbers of a disease, a 4-week SMA would be calculated by averaging the cases for four consecutive weeks. This average is then plotted at the center of this time window. As new data points become available, the window moves forward in time, hence the term "moving" average.