# How to Graph a Linear Equation in Excel (with Easy Steps)

Get FREE Advanced Excel Exercises with Solutions!

Excel users are frequently interested in how to graph a linear equation or a function in Excel. Fortunately, this is simple to accomplish using Excel’s built-in formulae. This lesson shows you how to visualize equations/functions in Excel.

## What Is a Linear Equation?

A linear equation is a two-variable equation that produces a straight line when plotted on a graph. A one-degree equation is another name for it. A linear equation with two variables is of the following form:

Ax + By = C

## Steps to Graph a Linear Equation in Excel

### Step 1: Find Value of Dependent Variable

Assume we would like to graph the following equation: y = 3x + 5. The figure below explains how to produce the values of dependent variables for this linear equation in Excel, using an x-value range of 1 to 10:

• Imagine we were assigned the x values shown in the illustration. We have now input the following equation to obtain the y values that correspond to the supplied x values:
y = 3x + 5 • Now, we have to drag the fill handle to complete the data range. ### Step 2: Select Range and Choose a Suitable Graph Type

• Then, select the values from B4 to C9. And choose the Insert tab. Select the Scatter plot option from the Charts category. • The corresponding plot will be generated automatically: ## How to Plot a Linear Equation in Excel Starting from No Data

Sometimes, we may create a graph in Excel without utilizing data to observe the behavior of that graph.  In this section, we have discussed that.

📌 Steps:

• Now we will plot an equation that has the following general formula:
y= m*x + c • Now, in cell E5, type the formula:
`=(B5*C5)+D5`
• Next, press Enter.
• Because we haven’t yet entered the cell values, it will return 0. • First of all, select the range C4:C9.
• Then, press and hold down the Ctrl key.
• After that, select the range E4:E9.
• The following figure will make it clear for you. • Subsequently, go to the Insert tab.
• After that like the below image go to Scatter plot. • As a result, you’ll obtain the graph. However, because we have an empty dataset, there will be no plotting for the time being. • First of all, place the value of m as 5 for all the cases.
• Then, type your desired values for the independent variable x.
• Similarly, insert the value of c as 3.
• At last, apply the AutoFill tool for getting the outcomes of the range E5:E9.
• Hence, it’ll return the accurate outputs for the y variable.
• Look at the below dataset to realize better. ## How to Add Equation to a Linear Graph of Excel

Using the excel equation of a line, we may add an equation to a plot in Excel. Excel graph equation is simple to plot, and this article will lead all categories of Excel users through the procedure of displaying a linear equation and integrating it into a plot.

📌 Steps:

• Our data will be tabulated in two columns. We will next pick the “scatter chart” button to display a graph after selecting our complete table and clicking “insert.” • To edit our graph, we will now click on the “+” symbol next to the chart and then Trendline to More Options • After the sidebar appears in Excel, we will now add the chart’s equation finally by selecting “Display Equation on Chart. • Now the equation of the formula appears in the graph shown in the red box. This usually helps the users when they are bound to demonstrate only graphs in their projects. ## Conclusion

Follow these steps and stages to graph a linear equation in Excel. You are welcome to download the workbook and use it for your own practice. If you have any questions, concerns, or suggestions, please leave them in the comments section. For more such articles, you can visit our blog ExcelDemy.

## Related Articles Al Ikram Amit

Hello, I'm Amit, a BUET graduate with a passion for Excel. Currently, I work as an Excel & VBA Content Developer at ExcelDemy, contributing insightful articles to the blog. I enjoy sharing my knowledge with others and always look for opportunities to grow as an Excel expert. Feel free to reach out if you need assistance or want to discuss the latest trends in Excel. Let's excel together in the world of data manipulation and analysis!

We will be happy to hear your thoughts Advanced Excel Exercises with Solutions PDF  