Computing polynomial coefficients for a data set

New Contributor

I have a column of data. I can chart the data and create a polynomial trendline. I can show the trendline equation and see the coefficients. But is there a way to compute the polynomial coefficients for a range of data? I need to use these values in a formula.

5 Replies
Best Response confirmed by skiprichards (New Contributor)
Perfect, thanks!

@Sergei BaklanHello, your link

Has this link changed?  Your line redirects me to the spreadsheetpage.  Am i missing the right idea here?  Thank you for any direction you can give. 

I am using the polynomial given to me in the trendline, 6th order but it does not compute properly.  I am fairly deft with bracketing and such, reviewed my formula many times and the values are outlandish. 



Looks like it's gone. Sorry, I don't know there to find this page.

@Camerik57   Re: ``I am using the polynomial given to me in the trendline, 6th order but it does not compute properly``


If you copying the coefficient from the trendline label, be sure to format the TL to display 15 significant digits.  I prefer Scientific with 14 decimal places. That works regardless of the magnitude of the coefficients.  But if all of the coefficients are "close" in magnitude, you might use Number with sufficient decimal places.


Even better:  Use LINEST to generate the coefficients.  For example, select 7 consecutive horizontal cells (e.g. A1:G1), and array-enter (press ctrl+shift+Enter instead of just Enter) a formula of the form:


=LINEST(Y1:Y100, Z1:Z100^{1,2,3,4,5,6})


However, also note that most polynomial trendlines are useful only for interpolating estimated Y values.  If you try to extrapolate (i.e. for X values outside the original range), often the trendline formula "blows up", taking wildly unexpected turns (literally).


If you need more assistance, please attach an example Excel file with representative data that demonstrates the problem that you perceive.