# Trend line

#### Anupam Shrivastava

##### New Member
Hi,
I am unable to resolve this issue on trend line.

I have 71 points on x-axis starting from 0.8% ending at 150%. Yaxis values are y(80%) = 0.3, y(100%) = 0.6, y(120%) = 0.9 and y(150%) = 1.8.

if I fit a polynomial of degree three I get a nice curve with equation 4e-06x^3-0.0003x^2+0.019x+0.2813

however when I put this in formula I get completely different curve. Any idea why this is happening?

### Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

#### pgc01

##### MrExcel MVP
Hi Anupam

You should get the same curve.

For ex., for just those 4 points you posted what is the equation you get and what's the formula you use in the sheet to calculate the values?

#### joeu2004

##### Well-known Member
if I fit a polynomial of degree three I get a nice curve with equation 4e-06x^3-0.0003x^2+0.019x+0.2813

however when I put this in formula I get completely different curve. Any idea why this is happening?

The error is due to the rounded coefficients. You need to format the trendline "label" (equation) so it displays more precision.

I like to always display 15 significant digits using the Scientific format. To do that: right-click on the trendline "label", clilck on Format Trendline Label, Number, Scientific, enter 14 into Decimal Places, and click on OK.

Then you can copy-and-paste each coefficient from the "label" into Excel cells. Be mindful of the sign of the coefficient. If the equation is of the form 4e-06x^3 - 0.0003x^2..., the second coefficient is -0.0003, not 0.0003.

(I assume you will use SUMPRODUCT or SERIESSUM to apply the coefficients to your data in Excel. Alternatively, you can write a formula that is similiar to the trendline equation, of course.)

Alternatively, you might consider using LINEST to derive the coefficients directly in Excel instead of relying on the chart trendline. Generally, for an order-3 polynomial, you would select 4 horizontal cells, then array-enter a formula of the following form (press ctrl+shift+Enter instead of just Enter):

=LINEST(Y1:Y71, X1:X71^{1,2,3})

If you want to use that approach, but you need more specifics, we need more specifics. The best thing to do is: upload an example Excel file to a file-sharing website, and post the public/share URL in a response here. The following is a list of some free file-sharing websites.

Dropbox: http://dropbox.com
Box.Net: http://www.box.net/files
MediaFire: http://www.mediafire.com
FileFactory: http://www.filefactory.com
FileSavr: http://www.filesavr.com
RapidShare: http://www.rapidshare.com
Windows OneDrive: http://onedrive.live.com

Replies
4
Views
61
Replies
8
Views
5K
Replies
8
Views
124
Replies
1
Views
305
Replies
1
Views
108

1,129,674
Messages
5,637,729
Members
416,981
Latest member
PLonchar

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

### Which adblocker are you using?

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

### Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back