All trendlines are the function of some mathematical value or process.
You can calculate the line of best fit using OLS regression. If you have Excel use the LINEST function.
It will then give you an equation for the line which can be used for forecasting: basically the slope of the line.
It will also give you R-squared which is a number between 0 and 1 - the closer to 1 the better the line fits the data.