#1 Excel tutorial on the net

  • Quadratic Equation

A quadratic equation is of the form ax 2 + bx + c = 0 where a ≠ 0. A quadratic equation can be solved by using the quadratic formula. You can also use Excel's Goal Seek feature to solve a quadratic equation.

1. For example, we have the formula y = 3x 2 - 12x + 9.5. It's easy to calculate y for any given x. For x = 1, y = 0.5

Excel Formula, x = 1

2. For x = 2, y = -2.5

Excel Formula, x = 2

3. But what if we want to know x for any given y? For example, y = 24.5. We need to solve 3x 2 - 12x + 9.5 = 24.5. We can solve the quadratic equation 3x 2 - 12x + 9.5 - 24.5 = 0 by using the quadratic formula.

4. You can use Excel's Goal Seek feature to obtain the exact same result. On the Data tab, in the Forecast group, click What-If Analysis.

Click What-If Analysis

5. Click Goal Seek.

Click Goal Seek

The Goal Seek dialog box appears.

6. Select cell B2.

7. Click in the 'To value' box and type 24.5

8. Click in the 'By changing cell' box and select cell A2.

9. Click OK.

Goal Seek Parameters

Note: Excel returns the solution x = 5. Excel finds the other solution (x = -1) if you start with an x-value closer to -1. For example, enter the value 0 into cell A2 and repeat steps 5 to 9. To find the roots, set y = 0 and solve the quadratic equation 3x 2 - 12x + 9.5 = 0. In this case, set 'To value' to 0.

Bonus! Improve your understanding of quadratic equations by visualizing the solutions on a chart. Let's visualize the solutions of y = 3x 2 - 12x + 9.5 = 24.5.

10. Populate column A with multiple x-values and find their corresponding y-values by dragging the formula in cell B2 down.

XY Values

11. Create an XY scatter chart and add a horizontal line (y = 24.5) to the chart. If you're interested, you can download the accompanying Excel file .

Graph of Quadratic Equation

Explanation: the points where the curve intersects the horizontal line represent the solutions to the quadratic equation for the given y-value. You can clearly see the solutions x = -1 and x = 5.

  • What-If Analysis

Learn more, it's easy

  • Data Tables

Download Excel File

  • quadratic-equation.xlsx

Next Chapter

Follow excel easy.

Excel Easy on Facebook

Most Popular

  • Pivot Tables
  • Formulas and Functions
  • Conditional Formatting
  • Find Duplicates
  • Drop-down List
  • Index and Match

Become an Excel Pro

  • 300 Examples

Quadratic Equation • © 2010-2024 Popular Excel Topics: Pivot Tables • Vlookup • Formulas • Charts • Conditional Formatting

Statology

Statistics Made Easy

How to Solve a Quadratic Equation in Excel (Step-by-Step)

A quadratic equation takes the following form:

ax 2 + bx + c = y

Often you will be given the value for y and will be asked to solve for the value of x .

For example, suppose we have the following quadratic equation:

4x 2 – 20x + 16 = -8

It turns out that setting x = 3 or x = 2 will solve this equation.

To solve quadratic equations in Excel, you can use the Goal Seek function.

The following step-by-step example shows how to use the Goal Seek function in practice.

Step 1: Enter the Equation

First, let’s enter some random value for x and the formula for the quadratic equation for y:

solve quadratic equation in excel

Step 2: Find the First X Value Using Goal Seek

Next, click the Data tab along the top ribbon, then click the What-If Analysis button, then Goal Seek :

solve quadratic equation in excel

In the new window that appears, specify that you’d like to set cell B2 equal to -8 by changing the value in cell A2 :

solve quadratic equation in excel

Once we click OK , the Goal Seek function will automatically find the value for x that solves the equation:

solve quadratic equation in excel

Goal Seek finds that the value x=2 (assuming 1.9999 rounds to 2) solves the quadratic equation.

Step 3: Find the Second X Value Using Goal Seek

To find the second x value that solves the quadratic equation, set the initial x-value to a different number.

For example, we could choose to set the initial x-value to 4:

solve quadratic equation in excel

We can then run the Goal Seek function again and see that it finds a new solution of x=3 :

solve quadratic equation in excel

Thus, the two x-values that can solve this quadratic equation are x=2 and x=3 .

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

How to Solve a System of Equations in Excel How to Plot an Equation in Excel

' src=

Published by Zach

Leave a reply cancel reply.

Your email address will not be published. Required fields are marked *

How To Solve a Quadratic Equation

solve quadratic equation in excel

Generic Formula

There are two possible solutions for any quadratic equation. This is one possible solution.

This is the other possible solution.

  • A – This is the coefficient of the squared term in the quadratic equation.
  • B – This is the coefficient of the single powered term in the quadratic equation.
  • C – This is the constant in the quadratic equation.

What It Does

These formulas will give the solutions to a quadratic equation of the form Ax^2 + Bx + C = 0 .

How It Works

This is a simple algebraic formula and uses the SQRT function which returns the square root of a given number and the ^ operator which raises a given number to a given power.

In our example x^2 – 3x + 2 = 0 the solution is given by =(-(-3)+SQRT(-3^2-4*1*2))/(2*1) which results in 2 . Similarly the other solution is 1 .

Not every quadratic equation has a solution in the real numbers, when this is the case the formula will result in a #NUM! error.

About the Author

John MacDougall

John MacDougall

Subscribe for awesome Microsoft Excel videos 😃

solve quadratic equation in excel

I’m John , and my goal is to help you Excel!

You’ll find a ton of awesome tips , tricks , tutorials , and templates here to help you save time and effort in your work.

  • Pivot Table Tips and Tricks You Need to Know
  • Everything You Need to Know About Excel Tables
  • The Complete Guide to Power Query
  • Introduction To Power Query M Code
  • The Complete List of Keyboard Shortcuts in Microsoft Excel
  • The Complete List of VBA Keyboard Shortcuts in Microsoft Excel

solve quadratic equation in excel

Related Posts

8 Ways to Apply a Formula to an Entire Column in Microsoft Excel

8 Ways to Apply a Formula to an Entire Column in Microsoft Excel

Feb 7, 2024

Are you wondering how to apply a formula to an entire column in Excel? Read...

5 Ways to Lock and Unlock Formulas in Microsoft Excel

5 Ways to Lock and Unlock Formulas in Microsoft Excel

Mar 13, 2023

Do you want to lock the formulas in your Excel sheet to prevent other users...

9 Ways to Show Formulas in Microsoft Excel

9 Ways to Show Formulas in Microsoft Excel

Aug 12, 2022

This post is going to show you all the different ways you can show the...

Get the Latest Microsoft Excel Tips

solve quadratic equation in excel

Follow us to stay up to date with the latest in Microsoft Excel!

  • CELL REFERENCE

solve quadratic equation in excel

Post your problem and you'll get expert help in seconds

  • All articles

How to solve quadratic equation in excel

We can solve quadratic equations in excel by inputting an equation that contains our variable (e.g. X), then we would define X using a formula. Thereafter, we would use this quadratic formula to solve for X using some given roots of the equation. This tutorial will teach use how to solve quadratic equation in excel.

solve quadratic equation in excel

Data for Solving Quadratic Equation

  • To do this, we will type in our quadratic equation y = a + bx + cx^2 and also define the root of the variable “ X ” by typing this quadratic formula x0 = [-b ± SQRT(b^2 - 4ac]/2a

solve quadratic equation in excel

  • We will now prepare a table for the roots of “X” which are “x1” and “x2”, and ascribing values for the variables in the equation of “X” which are “a, b, and c”

solve quadratic equation in excel

  • We will type this formula into Cell B11 =(-B8+SQRT(B8^2-4*B7*B9))/(2*B7)

solve quadratic equation in excel

  • We will now press the enter key

solve quadratic equation in excel

  • We will now repeat the same operation for “ x2 ” by copying, pasting and changing “+” sign into a “ – “minus sign in the formula in Cell B12 as =(-B8-SQRT(B8^2-4*B7*B9))/(2*B7)

solve quadratic equation in excel

Instant Connection to an Expert through our Excelchat Service

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Leave a Comment

avatar

Subscribe to Excelchat.co

Get updates on helpful Excel topics

Amazon.com, Inc

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.

Save time by asking instead! Most questions solved and answered in 10 minutes.

  • Google Sheets
  • This article

How to Solve a Quadratic Equation in Excel

To solve a quadratic equation in Excel, you can use the built-in formula "=QUAD()" or the more versatile "=LINEST()" function. Follow these steps to find the roots of a quadratic equation in Excel:

Using QUAD() function

  • Open Microsoft Excel and create a new spreadsheet.
  • In cell A1, type the coefficient of the squared term (a).
  • In cell A2, type the coefficient of the linear term (b).
  • In cell A3, type the constant term (c).
  • In cell A4, type the following formula: =QUAD(A1, A2, A3)
  • Press Enter, and Excel will calculate the roots of the quadratic equation.

Note: The QUAD() function is only available in Excel 2013 and later versions. If your Excel version doesn't support the QUAD() function, you can use the LINEST() function, as described in the next section.

Using LINEST() function

  • In cell A4, type the following formula: =(-A2+SQRT(A2^2-4*A1*A3))/(2*A1)
  • In cell A5, type the following formula: =(-A2-SQRT(A2^2-4*A1*A3))/(2*A1)

Let's solve the quadratic equation 2x^2 - 5x + 3 = 0 using the LINEST() function:

  • In cell A1, type "2" (coefficient of the squared term).
  • In cell A2, type "-5" (coefficient of the linear term).
  • In cell A3, type "3" (constant term).

The results in cells A4 and A5 are the two roots of the quadratic equation: x = 1 and x = 1.5.

ExcelFCN

Swift & Practical Formulas

Solving Quadratic Equations in Excel: Real & Complex Roots

In this article, you’ll learn how to solve quadratic equations and practice in Excel.

A quadratic equation is a type of polynomial equation of the second degree. The general form of a quadratic equation is ax 2 + bx + c = 0 . In this equation, “a”, “b”, and “c” are coefficients. “x” represents the variable we want to solve for. “x 2 ” represents the squared term, “bx” is the linear term, and “c” is the constant.

How to solve quadratic equations in Excel

Before starting to solve a quadratic equation in Excel, let’s talk about the mathematical expressions of this operation. The quadratic formula below is a commonly used method to find the roots of a quadratic equation:

x = (-b ± √(b² – 4ac)) / (2a)

The value inside the square root, “b² – 4ac” is called the discriminant. The solution of the quadratic equation depends on the value of the discriminant:

  • If the discriminant is positive (b² – 4ac > 0), there are two distinct real roots.
  • If the discriminant is zero (b² – 4ac = 0), there is one real solution (a repeated root).
  • If the discriminant is negative (b² – 4ac < 0), there are no real solution, but there are complex roots.

Quadratic equation example

To solve a quadratic equation in Excel, let’s see an example now.

solve quadratic equation in Excel

For instance, to solve an equation like x 2 -2x+1=0 , type the coefficients to the cells C5, D5,and E5 respectively. To check the discriminant value type the formula =D5^2-4*C5*E5 to the cell F5. Finally, the formula below in the cell G5 returns the first real root.

=(-D5+SQRT(D5^2-4*C5*E5))/(2*C5)

And the second root is calculated by the formula in the cell H5.

=(-D5-SQRT(D5^2-4*C5*E5))/(2*C5)

Finding complex roots of quadratic equation

We know that a quadratic equation has complex roots if the discriminant (b² – 4ac) is less than zero. To calculate the complex roots of a quadratic equation, we’ll need some functions other than those used in calculating real roots. These are built-in complex Excel functions: IMDIV , IMSUM . You can check this page for the details about them.

quadratic equation in Excel with complex roots

The formula in the cell G4 returns the first complex root of the equation.

=IMDIV(IMSUM(-D4,SQRT(ABS(D4^2-4*C4*E4))&”i”),2*C4)

The second one in the cell H4 is as follows:

=IMDIV(IMSUM(-D4,-SQRT(ABS(D4^2-4*C4*E4))&”i”),2*C4)

Related Formulas

  • Usage of complex number functions in Excel

How to Solve a Quadratic Equation in Excel (Step-by-Step)

A quadratic equation takes the following form:

ax 2 + bx + c = y

Often you will be given the value for y and will be asked to solve for the value of x .

For example, suppose we have the following quadratic equation:

4x 2 – 20x + 16 = -8

It turns out that setting x = 3 or x = 2 will solve this equation.

To solve quadratic equations in Excel, you can use the Goal Seek function.

The following step-by-step example shows how to use the Goal Seek function in practice.

Step 1: Enter the Equation

First, let’s enter some random value for x and the formula for the quadratic equation for y:

solve quadratic equation in excel

Step 2: Find the First X Value Using Goal Seek

Next, click the Data tab along the top ribbon, then click the What-If Analysis button, then Goal Seek :

solve quadratic equation in excel

In the new window that appears, specify that you’d like to set cell B2 equal to -8 by changing the value in cell A2 :

solve quadratic equation in excel

Once we click OK , the Goal Seek function will automatically find the value for x that solves the equation:

solve quadratic equation in excel

Goal Seek finds that the value x=2 (assuming 1.9999 rounds to 2) solves the quadratic equation.

Step 3: Find the Second X Value Using Goal Seek

To find the second x value that solves the quadratic equation, set the initial x-value to a different number.

For example, we could choose to set the initial x-value to 4:

solve quadratic equation in excel

We can then run the Goal Seek function again and see that it finds a new solution of x=3 :

solve quadratic equation in excel

Thus, the two x-values that can solve this quadratic equation are x=2 and x=3 .

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

How to Solve a System of Equations in Excel How to Plot an Equation in Excel

Excel: How to Find Max Value by Group

Mongodb: how to calculate the average value of a field, related posts, how to create a stem-and-leaf plot in spss, how to create a correlation matrix in spss, how to convert date of birth to age..., excel: how to highlight entire row based on..., how to add target line to graph in..., excel: how to use if function with negative..., excel: how to use if function with text..., excel: how to use greater than or equal..., excel: how to use if function with multiple..., how to extract number from string in pandas.

logo

Best Excel Tutorial

The largest Excel knowledge base ✅ The best place to learn Excel online ❤️

How to Solve a Quadratic Equation

Quadratic equations are a common mathematical problem, and you can efficiently solve them using Microsoft Excel. Here’s a systematic approach to finding the solutions to a quadratic equation in Excel:

Table of Contents

Step 1: Enter the Coefficients

In your Excel worksheet, allocate separate cells for the coefficients a , b , and c . For instance:

  • Place a in cell A1 and input the coefficient (e.g., 2).
  • Place b in cell A2 and input its value (e.g., 5).
  • In cell A3, label it c and input the coefficient (e.g., -3).

Step 2: Calculate the Discriminant (Δ)

Now, calculate the discriminant (Δ) using a formula in a cell:

=B2^2 – 4*A1*A3

This formula computes the value inside the square root of the quadratic formula. In this example, the result in the cell would be 49 because 5^2 – 4*2*(-3) = 49.

Step 3: Calculate the Two Solutions

In separate cells, calculate the two solutions, x₁ and x₂, using the quadratic formula:

For x₁, use the formula:

=(-B2 + SQRT(D2)) / (2*A1)

In this example, it will be =(-5 + SQRT(49)) / (2*2), which equals 1.

For x₂, use the formula:

=(-B2 – SQRT(D2)) / (2*A1)

In this example, it will be =(-5 – SQRT(49)) / (2*2), which equals -1.5.

Step 4: Display the Solutions

Designate two adjacent cells to display the solutions x₁ and x₂. These cells will show the values of x that solve the quadratic equation. In this example, you’ll see x₁ = 1 and x₂ = -1.5.

Step 5: Interpret the Results

To gain a deeper understanding of the solutions, consider their implications within the context of your problem. Positive solutions represent the x-coordinates of points where the quadratic equation intersects the x-axis, while negative solutions indicate no real roots. Understanding the significance of these values can provide valuable insights into the behavior of your quadratic equation.

Additional Considerations

If the discriminant is 0, the quadratic equation has a single real solution.

If the discriminant is negative, the quadratic equation has no real solutions.

If the discriminant is positive, the quadratic equation has two real solutions.

Practical Applications

Quadratic equations are used in a variety of real-world applications, such as physics, engineering, and finance. For example, you can use a quadratic equation to calculate the trajectory of a projectile, the height of a parabolic arch, or the interest on a loan.

By following the steps, you can efficiently solve quadratic equations in Excel and gain valuable insights into their behavior and practical applications.

Related posts:

Excel insert pictures ribbon

Your email address will not be published. Required fields are marked *

Smart Calculations

Smart Calculations

How to Solve a Quadratic Equation in Excel

In this tutorial, you will learn how to solve a quadratic equation in Excel.

An algebraic equation of the second degree in x is a quadratic equation. The quadratic equation is written as ax2 + bx + c = 0, where x is the variable, a and b are the coefficients, and c is the constant term. The requirement that the coefficient of x2 be a non-zero term (a 0) is necessary for an equation to qualify as a quadratic equation. The x2 term is written first when constructing a quadratic equation in standard form, then the x term, and finally the constant term.

Once ready, we’ll get started by utilizing real-world examples to show you how to solve a quadratic equation in Excel.

Table of Contents

Solve a Quadratic Equation in Excel

Before we begin we will need a group of data to solve a quadratic equation in Excel.

As an illustration, consider the formula y = 3×2 – 12x + 9.5. It is simple to determine y for any given x. For x = 1, y = 0.5

What if, however, we wish to learn x for every given y? Y = 24.5, as an illustration. Solving 3×2 – 12x + 9.5 = 24.5 is necessary. Using the quadratic formula, we can find the solution to the quadratic equation 3×2 – 12x + 9.5 – 24.5 = 0.

We can first select ‘What-If Analysis’ then select ‘Goal Seek’.

solve quadratic equation in excel

In the pop-up box, we will then select Y value as ‘Set cell’, and X value as ‘By changing cell’.

solve quadratic equation in excel

Once we are done, you will be able to solve a quadratic equation in Excel.

solve quadratic equation in excel

SpreadsheetWeb

How to solve quadratic equations in Excel – Formula and VBA

by Ilker | Oct 30, 2019 | Excel Tips & Tricks

solving quadratic equations

This is the second part of the how to solve quadratic equations in Excel guide. Here, we are going to be focusing on how to do this manual and VBA method, whereas the first part shows how to do this using the Goal Seek feature. In this guide, we are going to show you a different approach to solving quadratic equations in Excel using formulas and VBA.

If you missed the first part:

A quadratic function is a type of equation that contains a squared variable. It is called quadratic because quad means square in Latin. The quadratic functions usually have a structure like ax² + bx + c = 0, where x represents an unknown variable, and a, b, and c represent known constants. Excel can help you easily solve these types of equations for x.

The Quadratic Formula

A quadratic function's variable can take 2 values, meaning that there can be 2 solutions. To find these values, you can use the quadratic formula:

solve quadratic equation in excel

The plus/minus operator (±) means the formula should be executed twice. Once with plus (+):

solve quadratic equation in excel

And once with minus (-):

solve quadratic equation in excel

The a , b and c values are known numbers where a ≠ 0 . Since we know the formula representation and the values, we can now create a formula for solving quadratic equations.

The Standard Formula

For this first approach, you essentially need to replicate the quadratic formula in Excel. You can enter the known values ( a, b and c ) right away into the formula. However, this means that the formula will be static and you will need to change the values one-by-one again when you need to solve for another equation.

Alternatively, you can pull the input values from cells to place the constants a, b and c and use those references inside the formula. Changing the cell value is usually a lot easier than changing all values one-by-one, especially with complex formulas.

Let's assume that our constant values are in cells C7, D7 and E7 . In this example, we also named these cells as a_1, b_1 and c_1 to make the formula easier to read. The formulas will be,

=(-b_1 + SQRT(POWER(b_1,2) - 4*a_1*c_1)) / (2*a_1)

=(-b_1 - SQRT(POWER(b_1,2) - 4*a_1*c_1)) / (2*a_1)

As you can see, one of the formulas uses plus and the other uses minus. This is how you can create a structure to solve the quadratic equations using traditional formulas. You can learn more about the POWER and SQRT functions in the respective pages.

solving quadratic equations

Solving Quadratic Equations using VBA

The standard formula method is effective and dynamic. However, it may be hard to remember or use. While Excel doesn't have a function that allows solving quadratic equations with one click, you can create yourself one!

To start working with VBA, you need to enable the Visual Basic for Applications (VBA) window. When your workbook is open, press the Alt + F11 key combination. Once the VBA window is active, add a module. Modules are pages where you can write your VBA code.

To learn more about VBA and macros, please see how to create a macro in Excel .

Copy and paste the code below into the module you've just added:

Function SolveQuadraticEquation(a As Integer, b As Integer, c As Integer, result As Integer) If result = 1 Then SolveQuadraticEquation = (-b + Sqr(b * b - 4 * a * c)) / (2 * a) ElseIf result = 2 Then SolveQuadraticEquation = (-b - Sqr(b * b - 4 * a * c)) / (2 * a) Else SolveQuadraticEquation = "Invalid result value. It should be 1 or 2." End If End Function

This code creates a new function named SolveQuadraticEquation . This function has 4 arguments - 3 for known values, and 1 for selecting the plus/minus sign.

solving quadratic equations

After pasting the code, return to the Excel window and test your new function. First, enter the 3 known values, a, b and c . Set 1 or 2 to select between plus and minus respectively.

solve quadratic equation in excel

Related posts

How to get the worksheet name, workbook name, and file path

Recent Posts

  • Creating an Online Searchable Database with SpreadsheetWEB
  • How to Create an Online Food Calorie Calculator without Coding?
  • Optimizing SpreadsheetWeb Applications by Migrating Large Excel Data Sets to External Databases
  • How to Build an Online Tip Calculator without Coding
  • Modulo Operation in Excel: Getting the Remainder of the Division
  • Basic Tutorial
  • VBA Examples
  • Functions Examples
  • Compatibility Excel Formulas & Functions
  • Tips and Tricks
  • Data Analysis
  • Other Tutorials

Excel IF online free tutorials

Solve a Quadratic Equation in Excel

Quadratic equation.

A quadratic equation is of the form ax 2 + bx + c = 0 where a ≠ 0. A quadratic equation can be solved by using the quadratic formula. You can also use Excel’s Goal Seek feature to solve a quadratic equation.

1. For example, we have the formula y = 3x 2 – 12x + 9.5. It’s easy to calculate y for any given x. For x = 1, y = 0.5

Excel Formula, x = 1

2. For x = 2, y = -2.5

Excel Formula, x = 2

3. But what if we want to know x for any given y? For example, y = 24.5. We need to solve 3x 2 – 12x + 9.5 = 24.5. We can solve the quadratic equation 3x 2 – 12x + 9.5 – 24.5 = 0 by using the quadratic formula.

3x 2 – 12x -15 = 0

a = 3, b = -12, c = -15

D = b 2 – 4ac = (-12) 2 – 4 * 3 * -15 = 144 + 180 = 324

4. You can use Excel’s Goal Seek feature to obtain the exact same result. On the Data tab, in the Forecast group, click What-If Analysis.

Click What-If Analysis

5. Click Goal Seek.

Click Goal Seek

The Goal Seek dialog box appears.

6. Select cell B2.

7. Click in the ‘To value’ box and type 24.5

8. Click in the ‘By changing cell’ box and select cell A2.

9. Click OK.

Goal Seek Parameters

Note: Excel returns the solution x = 5. Excel finds the other solution if you start with an x-value closer to x = -1. For example, enter the value 0 into cell A2 and repeat steps 5 to 9. To find the roots, set y = 0 and solve the quadratic equation 3x 2 – 12x + 9.5 = 0. In this case, set ‘To value’ to 0.

4/4 Completed! Learn more about what-if analysis >

Next Chapter: Solver

RELATED ARTICLES MORE FROM AUTHOR

 width=

Create Charts in Excel

Ways that offset function is absolutely useful in business, or function: 10 beneficial ways to use or function, pmt function in excel and 13 different formulas, understanding pv function and 10 different formulas, rand formula in excel and ways to use it, editor picks, find and replace in excel, how to convert number to words in excel, powershell array, power query in excel, even more news.

 width=

Multi Level Pie Chart in Excel

How to count non blank cells in excel, multiple overlay charts in excel, popular category.

  • Office Tools 674
  • MS Excel Tutorial 429
  • Functions 331
  • Tips and Tricks 280
  • Functions Examples 189

 width=

How to change the color of markers on a chart?

Online Tutorials Library List | Tutoraspire.com

How to Solve a Quadratic Equation in Excel (Step-by-Step)

A quadratic equation takes the following form:

ax 2 + bx + c = y

Often you will be given the value for y and will be asked to solve for the value of x .

For example, suppose we have the following quadratic equation:

4x 2 – 20x + 16 = -8

It turns out that setting x = 3 or x = 2 will solve this equation.

To solve quadratic equations in Excel, you can use the Goal Seek function.

The following step-by-step example shows how to use the Goal Seek function in practice.

Step 1: Enter the Equation

First, let’s enter some random value for x and the formula for the quadratic equation for y:

solve quadratic equation in excel

Step 2: Find the First X Value Using Goal Seek

Next, click the Data tab along the top ribbon, then click the What-If Analysis button, then Goal Seek :

solve quadratic equation in excel

In the new window that appears, specify that you’d like to set cell B2 equal to -8 by changing the value in cell A2 :

solve quadratic equation in excel

Once we click OK , the Goal Seek function will automatically find the value for x that solves the equation:

solve quadratic equation in excel

Goal Seek finds that the value x=2 (assuming 1.9999 rounds to 2) solves the quadratic equation.

Step 3: Find the Second X Value Using Goal Seek

To find the second x value that solves the quadratic equation, set the initial x-value to a different number.

For example, we could choose to set the initial x-value to 4:

solve quadratic equation in excel

We can then run the Goal Seek function again and see that it finds a new solution of x=3 :

solve quadratic equation in excel

Thus, the two x-values that can solve this quadratic equation are x=2 and x=3 .

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

How to Solve a System of Equations in Excel How to Plot an Equation in Excel

Excel: How to Find Max Value by Group

Mongodb: how to calculate the average value of a field, you may also like, how to create a stem-and-leaf plot in spss, how to create a correlation matrix in spss, excel: how to use if function with negative numbers, excel: how to use if function with text values, excel: how to use greater than or equal to in if function, excel: how to use if function with multiple conditions.

Solver Title

Practice

Generating PDF...

  • Pre Algebra Order of Operations Factors & Primes Fractions Long Arithmetic Decimals Exponents & Radicals Ratios & Proportions Percent Modulo Number Line Mean, Median & Mode
  • Algebra Equations Inequalities System of Equations System of Inequalities Basic Operations Algebraic Properties Partial Fractions Polynomials Rational Expressions Sequences Power Sums Interval Notation Pi (Product) Notation Induction Logical Sets Word Problems
  • Pre Calculus Equations Inequalities Scientific Calculator Scientific Notation Arithmetics Complex Numbers Polar/Cartesian Simultaneous Equations System of Inequalities Polynomials Rationales Functions Arithmetic & Comp. Coordinate Geometry Plane Geometry Solid Geometry Conic Sections Trigonometry
  • Calculus Derivatives Derivative Applications Limits Integrals Integral Applications Integral Approximation Series ODE Multivariable Calculus Laplace Transform Taylor/Maclaurin Series Fourier Series Fourier Transform
  • Functions Line Equations Functions Arithmetic & Comp. Conic Sections Transformation
  • Linear Algebra Matrices Vectors
  • Trigonometry Identities Proving Identities Trig Equations Trig Inequalities Evaluate Functions Simplify
  • Statistics Mean Geometric Mean Quadratic Mean Average Median Mode Order Minimum Maximum Probability Mid-Range Range Standard Deviation Variance Lower Quartile Upper Quartile Interquartile Range Midhinge Standard Normal Distribution
  • Physics Mechanics
  • Chemistry Chemical Reactions Chemical Properties
  • Finance Simple Interest Compound Interest Present Value Future Value
  • Economics Point of Diminishing Return
  • Conversions Roman Numerals Radical to Exponent Exponent to Radical To Fraction To Decimal To Mixed Number To Improper Fraction Radians to Degrees Degrees to Radians Hexadecimal Scientific Notation Distance Weight Time
  • Pre Algebra
  • One-Step Addition
  • One-Step Subtraction
  • One-Step Multiplication
  • One-Step Division
  • One-Step Decimals
  • Two-Step Integers
  • Two-Step Add/Subtract
  • Two-Step Multiply/Divide
  • Two-Step Fractions
  • Two-Step Decimals
  • Multi-Step Integers
  • Multi-Step with Parentheses
  • Multi-Step Rational
  • Multi-Step Fractions
  • Multi-Step Decimals
  • Solve by Factoring
  • Completing the Square
  • Quadratic Formula
  • Biquadratic
  • Logarithmic
  • Exponential
  • Rational Roots
  • Floor/Ceiling
  • Equation Given Roots
  • Newton Raphson
  • Substitution
  • Elimination
  • Cramer's Rule
  • Gaussian Elimination
  • System of Inequalities
  • Perfect Squares
  • Difference of Squares
  • Difference of Cubes
  • Sum of Cubes
  • Polynomials
  • Distributive Property
  • FOIL method
  • Perfect Cubes
  • Binomial Expansion
  • Negative Rule
  • Product Rule
  • Quotient Rule
  • Expand Power Rule
  • Fraction Exponent
  • Exponent Rules
  • Exponential Form
  • Logarithmic Form
  • Absolute Value
  • Rational Number
  • Powers of i
  • Partial Fractions
  • Is Polynomial
  • Leading Coefficient
  • Leading Term
  • Standard Form
  • Complete the Square
  • Synthetic Division
  • Linear Factors
  • Rationalize Denominator
  • Rationalize Numerator
  • Identify Type
  • Convergence
  • Interval Notation
  • Pi (Product) Notation
  • Boolean Algebra
  • Truth Table
  • Mutual Exclusive
  • Cardinality
  • Caretesian Product
  • Age Problems
  • Distance Problems
  • Cost Problems
  • Investment Problems
  • Number Problems
  • Percent Problems
  • Addition/Subtraction
  • Multiplication/Division
  • Dice Problems
  • Coin Problems
  • Card Problems
  • Pre Calculus
  • Linear Algebra
  • Trigonometry
  • Conversions

Click to reveal more operations

Most Used Actions

Number line.

  • ax^2+bx+c=0
  • x^2+2x+1=3x-10
  • 2x^2+4x-6=0
  • How do you calculate a quadratic equation?
  • To solve a quadratic equation, use the quadratic formula: x = (-b ± √(b^2 - 4ac)) / (2a).
  • What is the quadratic formula?
  • The quadratic formula gives solutions to the quadratic equation ax^2+bx+c=0 and is written in the form of x = (-b ± √(b^2 - 4ac)) / (2a)
  • Does any quadratic equation have two solutions?
  • There can be 0, 1 or 2 solutions to a quadratic equation. If the discriminant is positive there are two solutions, if negative there is no solution, if equlas 0 there is 1 solution.
  • What is quadratic equation in math?
  • In math, a quadratic equation is a second-order polynomial equation in a single variable. It is written in the form: ax^2 + bx + c = 0 where x is the variable, and a, b, and c are constants, a ≠ 0.
  • How do you know if a quadratic equation has two solutions?
  • A quadratic equation has two solutions if the discriminant b^2 - 4ac is positive.

quadratic-equation-calculator

  • High School Math Solutions – Quadratic Equations Calculator, Part 2 Solving quadratics by factorizing (link to previous post) usually works just fine. But what if the quadratic equation... Read More

Please add a message.

Message received. Thanks for the feedback.

  • Data Visualization
  • Statistics in R
  • Machine Learning in R
  • Data Science in R
  • Packages in R

Related Articles

  • Solve Coding Problems
  • How to find inverse log transformation in R ?
  • Solve System of Equations in R
  • Mean, Median and Mode in R Programming
  • Exporting Data from scripts in R Programming
  • Calculate Hyperbolic cosine of a value in R Programming - cosh() Function
  • Calculate sine of a value in R Programming - sin() Function
  • Calculate Hyperbolic sine of a value in R Programming - sinh() Function
  • Calculate Hyperbolic tangent of a value in R Programming - tanh() Function
  • Calculate tangent of a value in R Programming - tan() Function
  • Calculate Inverse sine of a value in R Programming - asin() Function
  • Calculate Square root of a number in R Language - sqrt() Function
  • Calculate Inverse cosine of a value in R Programming - acos() Function
  • Calculate Inverse tangent of a value in R Programming - atan() Function
  • Convert Degree value to Radian value in R Programming - deg2rad() Function
  • Convert Radian value to Degree value in R Programming - rad2deg() Function
  • Rounding off to the ceiling or floor value in R Programming - trunc() Function
  • Rounding off a value to specific digits in R Programming - round() Function
  • Calculate exponential of a number in R Programming - exp() Function
  • Calculate cosine of a value in R Programming - cos() Function

Solve Quadratic Equation in R

R language is the language of data visualization and data analytics. It is used to solve complex problems or to visualize the given datasets. In this article, we are going to learn how we can solve quadratic equations using R Programming Language .

What is a Quadratic Formula?

The quadratic formula is used to find the x-intercepts of the quadratic equation, We use the quadratic formula to solve the quadratic equation.

[Tex]x = \frac{{-b \pm \sqrt{{b^2 – 4ac}}}}{{2a}} [/Tex]

Where ‘x’ is given or we to find out and ‘a’, ‘b’, and ‘c’ are known numbers such that a!=0

  • If a=0, then the equation is linear and not a quadratic equation.
  • a,b,c are the coefficients of the equation, they are also called linear coefficients, quadratic coefficients, or free term.

Understanding Discriminant and its Three Cases

Notice the above formula and the square root part of it. ( b 2 -4ac ) is called the discriminant and it is used to determine the real roots that we will get or not.

  • Case 1: (b 2 -4ac) > 0 If this case is true, then we would have two distinct solutions or two real roots.
  • Case 2: (b2-4ac) = 0 If this case is true, then There would be one solution or one real root for the equation.
  • Case 3: (b2-4ac) < 0 If this case is true, then there would be no real roots and hence we don’t have to solve the equation at all.

These three cases are used to determine whether we get the solution or not, if the discriminant is negative we don’t solve the quadratic equation.

Solving Quadratic using R language

Now we are going to write a code using R to solve quadratic equations using quadratic formulas.

Initially, we created a function named ‘ quadRoots()’ in which we define variable and calculate the discriminant. Based on discriminant value, the function call the correct if-else ladder.

  • The user has to pass three arguments in the function to get the result. The parameters represent ‘a’, ‘b’, ‘c’.
  • The ‘nsmall’ argument is passed in ‘format()’ to set the precision of a number of digits right to the decimal point.

[1] "You have chosen the quadratic equation 2x^2 + 43x + 45." [1] "The two x-intercepts for the quadratic equation are -1.10311 and -20.39689."

Here, we get (b 2 -4ac) > 0, that’s why we got two solutions.

  • We stored the discriminant value in x_int_plus and x_int_neg . As we have to calculate the discriminant, once taking the ‘ +’ sign and once taking the ‘-‘ sign.

[1] "You have chosen the quadratic equation 2x^2 + 3x + 4." [1] "This quadratic equation has no real numbered roots."

After writing the function in R call the function with any three parameters as a, b, and c.

  • It calculates the discriminant (b 2 – 4ac) to execute the correct if-else ladder.
  • If the discriminant is negative, the function returns a message indicating that the quadratic equation has no real-numbered roots.
  • The function calculates and returns the two distinct real roots using the quadratic formula if the discriminant is positive.
  • If it is zero, then the equation has only one real root.

[1] "You have chosen the quadratic equation 2x^2 + 4x + 2." [1] "The quadratic equation has only one root. This root is -1"

Here we get ‘D=0’ , which means that the quadratic equation has only one real root.

  • Calculating the roots of quadratic equations that cant be solved by using a simple factoring technique.

Solving Quadratic using another function in R language

We have created a function with the name ‘result()’ that will take three arguments representing ‘a’, ‘b’, ‘c’.

  • Then, we have a second function with the name ‘discriminant()’ that will help us to find the discriminant.
  • The logic here is simple we follow the quadratic formula for solving the equation that can’t be solved by using the factoring technique.

[1] -0.5763735 -6.2765677

Here, D>0 that’s why we got two real roots.

[1] "There are no real roots."

Here, D<0 that’s why it doesn’t have any real roots.

Here, D=0 that’s why the equation has only one root.

R is useful for solving mathematical problems not simple but also complex problems. This language is majorly used for data visualization and solving complex mathematical problems. In the article, we have learned to solve quadratic equations using quadratic formulas.

Please Login to comment...

author

  • R Math-Function
  • 10 Best ChatGPT Prompts for Lawyers 2024
  • What is Meta’s new V-JEPA model? [Explained]
  • What is Chaiverse & How it Works?
  • Top 10 Mailchimp Alternatives (Free) - 2024
  • Dev Scripter 2024 - Biggest Technical Writing Event By GeeksforGeeks

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

IMAGES

  1. How to solve quadratic equation in excel

    solve quadratic equation in excel

  2. How To Solve a Quadratic Equation

    solve quadratic equation in excel

  3. Solve Quadratic Equation in Excel VBA (with Quick Steps)

    solve quadratic equation in excel

  4. Solve a Quadratic Equation in Excel (In Easy Steps)

    solve quadratic equation in excel

  5. How to solve quadratic equations in Excel

    solve quadratic equation in excel

  6. Graphing A Quadratic Equation in Excel

    solve quadratic equation in excel

VIDEO

  1. The QUADRATIC FORMULA- Solving quadratic equations

  2. Solve quadratic equation by quadratic formula

  3. Solve Quadratic Equation Using Calculator

  4. Solving Quadratic Equation: Quadratic Formula

  5. Solve Quadratic Equation by using Quadratic Formula

  6. #Quadratic Equation solution by formula method

COMMENTS

  1. Solve a Quadratic Equation in Excel (In Easy Steps)

    Learn how to use Excel's Goal Seek feature to solve a quadratic equation in easy steps. See the formula, the steps, and the results for the example of y = 3x 2 - 12x + 9.5.

  2. How to Solve a Quadratic Equation in Excel (Step-by-Step)

    Learn how to use the Goal Seek function to find the values of x that solve a quadratic equation in Excel. Follow the step-by-step example and see the formula, the values, and the results of the Goal Seek function.

  3. How To Solve a Quadratic Equation

    Learn how to use the SQRT and ^ operators to find the solutions of a quadratic equation in Excel with this simple formula. See examples, download a file, and download a file with the formula.

  4. Solving Equations in Excel (5 Useful Examples)

    Quadratic equation, Linear equation, Exponential equation, Differential equation, Non-linear equation Excel Tools to Solve Equations: There are some dedicated tools to solve equations in Excel like Excel Solver Add-in and Goal Seek Feature. Besides, you can solve equations in Excel numerically/manually, using Matrix System, etc. 1.

  5. How to solve quadratic equation in excel

    Learn how to solve quadratic equations in excel by inputting an equation, using a formula, and finding the roots of the variable "X". Follow the steps and screenshots to solve a simple example of a quadratic equation with two roots.

  6. How to Solve a Quadratic Equation in Excel

    To solve a quadratic equation in Excel, you can use the built-in formula "=QUAD ()" or the more versatile "=LINEST ()" function. Follow these steps to find the roots of a quadratic equation in Excel: Using QUAD () function Open Microsoft Excel and create a new spreadsheet. In cell A1, type the coefficient of the squared term (a).

  7. Solving Quadratic Equations in Excel: Real & Complex Roots

    To solve a quadratic equation in Excel, let's see an example now. For instance, to solve an equation like x2-2x+1=0, type the coefficients to the cells C5, D5,and E5 respectively. To check the discriminant value type the formula =D5^2-4*C5*E5 to the cell F5. Finally, the formula below in the cell G5 returns the first real root.

  8. How to Solve a Quadratic Equation in Excel (Step-by-Step)

    It turns out that setting x = 3 or x = 2 will solve this equation. To solve quadratic equations in Excel, you can use the Goal Seek function. The following step-by-step example shows how to use the Goal Seek function in practice. Step 1: Enter the Equation. First, let's enter some random value for x and the formula for the quadratic equation ...

  9. How to Solve a Quadratic Equation

    Quadratic equations are a common mathematical problem, and you can efficiently solve them using Microsoft Excel. Here's a systematic approach to finding the solutions to a quadratic equation in Excel: Table of Contents Step 1: Enter the Coefficients Step 2: Calculate the Discriminant (Δ) Step 3: Calculate the Two Solutions

  10. How to Solve a Quadratic Equation in Excel

    How to Solve a Quadratic Equation in Excel In this tutorial, you will learn how to solve a quadratic equation in Excel. An algebraic equation of the second degree in x is a quadratic equation. The quadratic equation is written as ax2 + bx + c = 0, where x is the variable, a and b are the coefficients, and c is the constant term.

  11. How to solve quadratic equations in Excel

    5x² + 6x + 1 = 0 => =5*POWER (x,2) + 6*x + 1 - y Note: Although adding y into the calculation isn't necessary if you always set it 0, we included it in our example for versatility. Using Goal Seek to solve quadratic equations in Excel Once the formula is ready in your spreadsheet, it is time to use Goal Seek to solve the quadratic function.

  12. How to solve quadratic equations in Excel

    = (-b_1 - SQRT (POWER (b_1,2) - 4*a_1*c_1)) / (2*a_1) As you can see, one of the formulas uses plus and the other uses minus. This is how you can create a structure to solve the quadratic equations using traditional formulas. You can learn more about the POWER and SQRT functions in the respective pages. Solving Quadratic Equations using VBA

  13. Solve a Quadratic Equation in Excel

    A quadratic equation can be solved by using the quadratic formula. You can also use Excel's Goal Seek feature to solve a quadratic equation. 1. For example, we have the formula y = 3x 2 - 12x + 9.5. It's easy to calculate y for any given x. For x = 1, y = 0.5 2. For x = 2, y = -2.5 3. But what if we want to know x for any given y?

  14. How to Solve a Quadratic Equation in Excel (Step-by-Step)

    This tutorial explains how to solve a quadratic equation in Excel, including a complete example.

  15. How to Use a Quadratic Formula in Microsoft Excel

    Subscribe Now:http://www.youtube.com/subscription_center?add_user=ehowtechWatch More:http://www.youtube.com/ehowtechThe quadratic formula is most commonly re...

  16. How to Use Quadratic Equation In Excel

    A quadratic equation can be solved by using the quadratic formula. You can also use Excel's Goal Seek feature to solve a quadratic equation. 1. For example, we have the formula y = 3x 2 - 12x + 9.5. It's easy to calculate y for any given x. For x = 1, y = 0.5 2. For x = 2, y = -2.5 3. But what if we want to know x for any given y?

  17. how to solve quadratic equations on excel

    this video is about finding the solution(roots) of a Quadratic equation on Excel with a graph.This Excel sheet includes all kinds of solutions of a quadratic...

  18. Quadratic Equations Using Excel : Using Microsoft Excel

    Subscribe Now:http://www.youtube.com/subscription_center?add_user=EhowtechWatch More:http://www.youtube.com/EhowtechExcel is such a powerful program that it ...

  19. How to Solve Polynomial Equation in Excel (5 Simple Methods)

    Steps: First, Double-click on cell B7 and enter the following formula: = (5*C7^3)- (2*C7^2)+ (3*C7)-6 Then, give any value for X in cell C5. Next, go to the Data tab and then to Forecast. Here, under What-If Analysis, click on Goal seek. Next, enter the values as in the image below and press OK.

  20. How to Solve Simultaneous Equations in Excel (3 Easy Ways)

    📌 Steps: In the first place, select the D13:D14 cells and enter the following expression. =MMULT (MINVERSE (B9:C10),D9:D10) Here, the B9:C10 and D9:D10 cells represent the X and Y coefficients and the constant values on the right-hand side of the equation.

  21. How to solve "Quadratic Equations" in Excel

    Learn hot to solve "Quadratic Equations" in Excel using:(1) Excel Solver Add-in(2) Formula.

  22. Quadratic Equation Calculator

    How do you calculate a quadratic equation? To solve a quadratic equation, use the quadratic formula: x = (-b ± √ (b^2 - 4ac)) / (2a). What is the quadratic formula? The quadratic formula gives solutions to the quadratic equation ax^2+bx+c=0 and is written in the form of x = (-b ± √ (b^2 - 4ac)) / (2a) Does any quadratic equation have two solutions?

  23. How to Solve Quadratic Equation in Excel VBA

    📌 Step 1: Preparing Layout for Solving Quadratic Equation in Excel First, create a layout to take the input of the coefficient and give the output of roots. For this- Assign cells from C5:E5 respectively to get input of coefficients a, b, and c of the quadratic equation.

  24. Solve Quadratic Equation in R

    Output: [1] "You have chosen the quadratic equation 2x^2 + 3x + 4." [1] "This quadratic equation has no real numbered roots." After writing the function in R call the function with any three parameters as a, b, and c. . It calculates the discriminant (b 2 - 4ac) to execute the correct if-else ladder.; If the discriminant is negative, the function returns a message indicating that the ...