How can I perform curve fitting in Excel and what are some examples of curve fitting in Excel?

Curve fitting in Excel is a statistical method used to find a mathematical function that best describes a set of data points. It involves finding the best-fit curve that passes through or near the data points, allowing for the prediction of values beyond the observed data. This technique is commonly used in fields such as finance, engineering, and science to analyze and interpret data.

To perform curve fitting in Excel, the first step is to organize the data in a table with the independent variable (x-values) in one column and the dependent variable (y-values) in another column. Then, select the data and go to the “Insert” tab and click on “Scatter” under the “Charts” section. This will create a scatter plot of the data points. Next, right-click on any data point and select “Add Trendline.” This will open a dialogue box where you can choose the type of function (linear, exponential, polynomial, etc.) and customize the trendline to fit your data. You can also click on the “Options” tab to display the equations and R-squared value on the plot.

Some examples of curve fitting in Excel include predicting future sales based on past data, analyzing stock market trends, and modeling population growth. It can also be used to determine the relationship between variables, such as the correlation between temperature and ice cream sales. Curve fitting in Excel is a powerful tool for data analysis and can provide valuable insights for decision-making in various industries.

Curve Fitting in Excel (With Examples)


Often you may want to find the equation that best fits some curve for a dataset in Excel.

Fortunately this is fairly easy to do using the Trendline function in Excel.

This tutorial provides a step-by-step example of how to fit an equation to a curve in Excel.

Step 1: Create the Data

First, let’s create a fake dataset to work with:

Step 2: Create a Scatterplot

Next, let’s create a scatterplot to visualize the dataset.

First, highlight cells A2:B16 as follows:

Next, click the Insert tab along the top ribbon, and then click the first plot option under Scatter:

This produces the following scatterplot:

Step 3: Add a Trendline

Next, click anywhere on the scatterplot. Then click the + sign in the top right corner. In the dropdown menu, click the arrow next to Trendline and then click More Options:

In the window that appears to the right, click the button next to Polynomial. Then check the boxes next to Display Equation on chart and Display R-squared value on chart.

This produces the following curve on the scatterplot:

Curve fitting in Excel

The equation of the curve is as follows:

y = 0.3302x2 – 3.6682x + 21.653

The tells us the percentage of the variation in the that can be explained by the predictor variables. The R-squared for this particular curve is 0.5874.

Step 4: Choose the Best Trendline

We can also increase the order of the Polynomial that we use to see if a more flexible curve does a better job of fitting the dataset.

For example, we could choose to set the Polynomial Order to be 4: 

This results in the following curve:

Curve fitting in Excel example

The equation of the curve is as follows:

y = -0.0192x4 + 0.7081x3 – 8.3649x2 + 35.823x – 26.516

The R-squared for this particular curve is 0.9707.

This R-squared is considerably higher than that of the previous curve, which indicates that it fits the dataset much more closely.

We can also use this equation of the curve to predict the value of the response variable based on the predictor variable. For example if x = 4 then we would predict that y = 23.34:

y = -0.0192(4)4 + 0.7081(4)3 – 8.3649(4)2 + 35.823(4) – 26.516 = 23.34


You can find more Excel tutorials on .

x