The MACD is calculated by subtracting the 26-day Exponential Moving Average (EMA) from the 12-day EMA of a security's price. The result is the MACD line. Additionally, a 9-day EMA of the MACD line, called the "signal line," is plotted on top of the MACD line.