For example if you know the slope of the line is 2 then your formula will look like this. The SLOPE function in Excel is used to calculate the slope of a line given known x and y values. SLOPE Function calculates the slope of a line generated by linear regression.
Book Your One Instructor.
In Cell B1 and C1 type X and Y. Recall that the R-squared value. And is the residual error The formula for intercept a and the slope b can be calculated per below. B is the slope of line a is y-intercept ie.