The SMA is calculated by adding a set of prices over a certain period and then dividing by the number of prices.