Calculate Trendline With Dates in X Axis

moandaa

New Member
Joined
Dec 20, 2017
Messages
1
I need to know how to calculate the slope and intercept of a trendline for the following data:
3/20/201762.7%
4/10/201758.5%
4/17/201762.2%
5/1/201760.5%
5/8/201760.9%
5/15/201755.6%
5/29/201758.0%

<tbody>
</tbody><colgroup><col><col></colgroup>

Any help is appreciated.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Welcome to the forum.

Maybe you know this already, but I'll just mention it to be sure. The Dates are actually Excel Serial Numbers. If you remove the date formatting (by formatting them as General), you will see that 3/20/2017 is actually serial number 42814. This means that it is the 42814th day after Jan 1, 1900, which is serial number one.

So you can find the slope and intercept by including the Dates as the x-values and the Values as the y-values in functions SLOPE and INTERCEPT, like this. Copy A12 and B12 down as necessary.

If you create an XY Scatterplot and include the equation of the Trendline, you will see that the figures match.

ABCDE
1Date (formatted)Value (formatted)
23/20/201762.70%
34/10/201758.50%
44/17/201762.20%
55/1/201760.50%
65/8/201760.90%
75/15/201755.60%
85/29/201758.00%
9
10
11Date (unformatted)Value (unformatted)
12428140.627intercept30.3539
13428350.585slope-0.00069
14428420.622
15428560.605
16428630.609
17428700.556
18428840.580

<tbody>
</tbody>
Sheet49

Worksheet Formulas
CellFormula
A12=A2
B12=B2
E12=INTERCEPT(B12:B18,A12:A18)
E13=SLOPE(B12:B18,A12:A18)

<tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,004
Messages
6,122,656
Members
449,091
Latest member
peppernaut

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?

Disable AdBlock

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
Back
Top