Where:
m = slope of the trend line
n = number of data points
Once you have calculated the slope, you can then calculate the y-intercept using the formula:
Where:
b = y-intercept
Finally, you can write the equation of the trend line in slope-intercept form as:
Plug in the values of m and b that you calculated to get the final equation in slope-intercept form of the trend line.