Time Series Trend Calculator — Formula
## How to Estimate a Time Series Trend
### Method
Fit a least-squares regression line Y = a + b*t where t is the time period (1, 2, 3, ...). The slope b is the average change per period. The intercept a is the estimated value at t=0. Extrapolating the line gives forecasts for future periods.
**Slope b = [n*Sum(t*y) - Sum(t)*Sum(y)] / [n*Sum(t^2) - (Sum(t))^2]**
### Method
Fit a least-squares regression line Y = a + b*t where t is the time period (1, 2, 3, ...). The slope b is the average change per period. The intercept a is the estimated value at t=0. Extrapolating the line gives forecasts for future periods.
**Slope b = [n*Sum(t*y) - Sum(t)*Sum(y)] / [n*Sum(t^2) - (Sum(t))^2]**
Esempio Risolto
Five periods with values 100, 108, 115, 120, 130.
- Sum(y) = 573, Sum(t) = 15, Sum(t^2) = 55
- Sum(t*y) = 1*100 + 2*108 + 3*115 + 4*120 + 5*130 = 1791
- Slope = (5*1791 - 15*573) / (5*55 - 225) = (8955-8595)/50 = 7.2
- Intercept = (573 - 7.2*15)/5 = (573 - 108)/5 = 93
- Forecast for period 6: 93 + 7.2*6 = 136.2