TREND

Returns values along a linear trend. Fits a straight line (using the method of least squares) to the arrays known_y's and known_x's. Returns the y-values along that line for the array of new_x's that you specify.

Syntax

TREND(known_y's,known_x's,new_x's,const)

Known_y's   is the set of y-values you already know in the relationship y = mx + b.

Known_x's   is an optional set of x-values that you may already know in the relationship y = mx + b.

New_x's   are new x-values for which you want TREND to return corresponding y-values.

Const   is a logical value specifying whether to force the constant b to equal 0.

Remarks

Example

Suppose a business wants to purchase a tract of land in July, the start of the next fiscal year. The business collects cost information that covers the most recent 12 months for a typical tract in the desired area. Known_y values are in cells B2:B13; the known_y values are $133,890, $135,000, $135,790, $137,300, $138,130, $139,100, $139,900, $141,120, $141,890, $143,230, $144,000, $145,290.

When entered as a vertical array in the range C2:C6, the following formula returns the predicted prices for March, April, May, June, and July:

TREND(B2:B13,,{13;14;15;16;17}) equals {146172;147190;148208;149226;150244}

The company can expect a typical tract of land to cost about $150,244 if it waits until July. The preceding formula uses the default array {1;2;3;4;5;6;7;8;9;10;11;12} for the known_x's argument, corresponding to the 12 months of sales data. The array {13;14;15;16;17} corresponds to the next five months.