Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Using the FORECAST Function.
by Allen Wyatt
(last updated February 15, 2014)
The FORECAST function can be used whenever you have an existing set of data pairs (x-values and y-values) and you want to calculate an estimated y-value to a new x-value. Excel performs a linear regression based on the existing values and then inserts the x-values into the expression for the regression which gives you an y-value. The new x-value can have any value and is not restricted to be larger than the existing x-values.
The FORECAST function uses the following syntax:
=FORECAST(X, Yrange, Xrange)
In this usage, X is the X value for which you want FORECAST to return a Y value. The Yrange and Xrange parameters are sets of know Y and X values.
As and example, let's say that you are going on a diet, and you decide to keep track of your weight each day. Every day you enter the date into column A and the weight for that day in column B. After getting about 10 days or so of measurements, you can use these data pairs to forecast when you will hit your target weight. If your target weight is 160 lbs., you could use the following formula:
=FORECAST(160, A2:A11, B2:B11)
The result is the anticipated date when you will reach the target weight. (This is, admittedly, a very simplistic example. Unless your metabolism is abnormal, your weight loss won't follow a straight line; it will likely decrease over time.)
Excel calculates the "trend line" (using linear regression) of the points in A2:B11 (i.e., it assumes there is a linear relationship between the dates and the weights. (This trend line is the same as you would get from plotting the data pairs and adding a trend line to the chart.)
The suitability of the FORECAST function to what you are trying to accomplish is directly tied the characteristics of the data you are working with. Suppose, for example, that you have data that increases by 5% per month over time, and you want to forecast how that data is likely to progress in the future. In such a situation you wouldn't want to use FORECAST because it works on linear data, and a 5% increase per month is not linear—it is exponential. Fitting a linear trend to an exponential data set results in an underestimation when you forecast the data. Instead you should use the GROWTH function as it is better suited for your data.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9176) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Using the FORECAST Function.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
The PROPER worksheet function is used to change the case of text so that only the first letter of each word is uppercase. ...Discover More
Excel includes a handy function that allows you to repeat characters or strings of characters. How you use the REPT ...Discover More
Character codes are the numeric values used, by a computer, to signify various alphanumeric characters. You can use the ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.