Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Quadratic Formula Calculator (Discriminant and Complex Roots)

Enter the coefficients a, b and c of the quadratic equation ax² + bx + c = 0. The equation below is linked to the input fields, so you can also edit the coefficients directly in it. The quadratic formula gives the solutions, along with the discriminant, the type of solutions and the steps.

Decimals, negative numbers and fractions such as 3/4 can be used. If a term is missing, as in x² − 4 = 0, enter 0 for its coefficient.
Result and graph
Enter the coefficients a, b and c in the fields on the left and press "Calculate". The result will appear here.

What you can do on this page

  • Enter the coefficients \(a, b, c\) and the quadratic formula solves \(ax^2 + bx + c = 0\) on the spot
  • It also shows the value of the discriminant \(D = b^2 - 4ac\) and the type of solutions (two different real solutions, a double root, or two complex solutions)
  • When the solutions are not real numbers, it still finds the two complex solutions, such as \(-0.5 \pm 0.866i\) (a conjugate pair that differs only in the sign of the imaginary part)
  • Coefficients can be decimals, negative numbers or fractions such as 3/4
  • A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
When a = 0, the equation is not quadratic, so it is solved as the linear equation \(bx + c = 0\) (the solution is \(x = -c \div b\)). a and b cannot both be 0.

What is this calculation used for?

Height and time of a ball thrown upward or a firework (physics and sports)

If you throw a ball straight up at 64 feet per second, its height after t seconds is about 64t − 16t² feet (using gravity of about 32 ft/s² and ignoring air resistance). "When is it 48 feet high?" means solving the quadratic equation −16t² + 64t − 48 = 0, and the quadratic formula gives t = 1 second and 3 seconds (once on the way up and once on the way down).
From planning the height where fireworks burst to the path of a basketball shot, the motion of anything thrown is tied to quadratic equations.

Finding the size of a garden bed or a lot from its area (DIY and real estate)

"I want a rectangular garden bed with an area of exactly 28 square feet, 3 feet longer than it is wide." With width x, you get x(x + 3) = 28, or x² + 3x − 28 = 0. The quadratic formula gives x = 4 and x = −7, but a length cannot be negative, so the bed is 4 feet wide and 7 feet long.
In real life, using a quadratic equation includes this last step: choosing which of the two solutions makes sense (checking whether each answer makes sense).

Working backward to a compound interest rate (money)

What annual rate turns $10,000 into $12,100 in 2 years? With the rate r, 10000(1 + r)² = 12100, which simplifies to r² + 2r − 0.21 = 0. The quadratic formula gives r = 0.1 and r = −2.1, and the one that makes sense as a rate, r = 0.1 (10% per year), is the answer.
Money calculations that "multiply by the same factor twice", like compound interest, lead to quadratic equations, so you can work back from a target amount to the return you need.

Designing bridges and arches (architecture and civil engineering)

The shape of an arch bridge or the cable of a suspension bridge is usually designed with a parabola, y = ax² + bx + c. Finding "how far from the center the height above the ground is a certain value" is exactly solving a quadratic equation.
When designers and civil engineers set the shape of a structure with formulas, the quadratic formula is one of the basics.

Estimating the prices where profit is zero (business)

"Raising the price increases the profit per item, but fewer items sell." In a simple model of this, profit is a quadratic function of the price. The prices where the profit is exactly 0 are the solutions of that quadratic equation, and they give a rough upper and lower limit for pricing.
Real markets are more complicated, but a first estimate of "where the profit hill ends" with a quadratic equation is a common starting point in business analysis.

Formulas and graphs

The quadratic formula
Graph
Standard notation (the usual math form)
\(x\) \(=\) \((\) \(-b\) \(\pm\) \(\sqrt{b^2 - 4ac}\) \()\) \(\div\) \((\) \(2a\) \()\)
In words (symbols replaced with words)
④ \(x\): solution \(=\) \((\) ① \(-b\): opposite of the \(x\) coefficient \(\pm\) ② \(\sqrt{b^2 - 4ac}\): square root of the discriminant \()\) \(\div\) \((\) ③ \(2a\): twice the \(x^2\) coefficient \()\)
The formula in words
① To \(-b\): opposite of the \(x\) coefficient
② add and subtract \(\sqrt{b^2 - 4ac}\): square root of the discriminant (the two ways of ±),
③ then divide each by \(2a\): twice the \(x^2\) coefficient
④ and you get \(x\): solution (because of ±, there are usually two solutions)
Quick example
The solutions of the quadratic equation x² + 3x − 4 = 0 (a = 1, b = 3, c = −4) are
\(x\): solution \(=\) \((\) opposite of \(b\) (−3) \(\pm\) square root of the discriminant 25 (5) \()\) \(\div\) \((\) twice \(a\) (2) \()\)
\(x = \dfrac{-3 \pm \sqrt{3^2 - 4 \times 1 \times (-4)}}{2 \times 1} = \dfrac{-3 \pm \sqrt{25}}{2} = \dfrac{-3 \pm 5}{2}\)
\(x = \dfrac{-3 + 5}{2} = 1, \quad x = \dfrac{-3 - 5}{2} = -4\)
Key idea
The quadratic formula is the "answer formula" you get by solving \(ax^2 + bx + c = 0\) (\(a \neq 0\)) all the way through by completing the square. Whatever the coefficients, you just put in the values of \(a, b, c\) to get the solutions. ± (plus or minus) means that "adding and subtracting both give a solution", so there are usually two solutions. Equations that can be solved by factoring can of course be solved this way too, and the answers always match.
The discriminant (tells you the type of solutions)
Graph
Standard notation (the usual math form)
\(D\) \(=\) \(b\) \(2\) \(-\) \(4\) \(\times\) \(a\) \(\times\) \(c\)
In words (symbols replaced with words)
⑥ \(D\): discriminant \(=\) ① \(b\): \(x\) coefficient ② squared \(-\) ③ the number \(4\) \(\times\) ④ \(a\): \(x^2\) coefficient \(\times\) ⑤ \(c\): constant term
The formula in words
① Take \(b\): \(x\) coefficient
② and square it. From that, subtract the product of
③ the number \(4\)
④ \(a\): \(x^2\) coefficient and
⑤ \(c\): constant term
⑥ and you get \(D\): discriminant
Quick example
The discriminant of x² + 3x − 4 = 0 (a = 1, b = 3, c = −4) is
\(D\): discriminant \(=\) \(b\) (3) squared \(-\) 4 \(\times\) \(a\) (1) \(\times\) \(c\) (−4)
\(D = 3^2 - 4 \times 1 \times (-4) = 9 + 16 = 25\)
Key idea
The discriminant \(D\) is exactly what is under the √ in the quadratic formula. It tells you what type of solutions to expect before you calculate them. - \(D > 0\): the square root is a positive real number, so there are two different real solutions (on the graph, the parabola crosses the x-axis at two points) - \(D = 0\): the square root is 0, so there is a double root, exactly one real solution (the parabola touches the x-axis) - \(D < 0\): the number under the √ is negative, so there is no real solution. If we extend numbers to include imaginary numbers, there are two complex solutions (the parabola does not meet the x-axis)
Double root (when the discriminant \(D = 0\))
Graph
Standard notation (the usual math form)
\(x\) \(=\) \(-b\) \(\div\) \((\) \(2a\) \()\)
In words (symbols replaced with words)
③ \(x\): double root \(=\) ① \(-b\): opposite of the \(x\) coefficient \(\div\) \((\) ② \(2a\): twice the \(x^2\) coefficient \()\)
The formula in words
① Divide \(-b\): opposite of the \(x\) coefficient
② by \(2a\): twice the \(x^2\) coefficient
③ and you get \(x\): double root (this is the only solution)
Quick example
The solution of x² + 2x + 1 = 0 (a = 1, b = 2, c = 1; discriminant D = 4 − 4 = 0) is
\(x\): double root \(=\) opposite of \(b\) (−2) \(\div\) \((\) twice \(a\) (2) \()\)
\(D = 2^2 - 4 \times 1 \times 1 = 0\)
\(x = \dfrac{-2}{2 \times 1} = -1\)
Key idea
When \(D = 0\), \(\sqrt{0} = 0\), so the "± √D" part of the quadratic formula disappears and the two solutions become one. This is called a double root (or repeated root). It happens when the left side factors into a perfect square, as in \(x^2 + 2x + 1 = (x + 1)^2\).
Two complex solutions (when the discriminant \(D < 0\))
Graph
Standard notation (the usual math form)
\(x\) \(=\) \((\) \(-b\) \(\pm\) \(\sqrt{4ac - b^2}\) \(\,i\) \()\) \(\div\) \((\) \(2a\) \()\)
In words (symbols replaced with words)
⑤ \(x\): two complex solutions \(=\) \((\) ① \(-b\): opposite of the \(x\) coefficient \(\pm\) ② \(\sqrt{4ac - b^2}\): square root of \(4ac - b^2\) ③ \(\,i\) \()\) \(\div\) \((\) ④ \(2a\): twice the \(x^2\) coefficient \()\)
The formula in words
① To \(-b\): opposite of the \(x\) coefficient
② add and subtract \(\sqrt{4ac - b^2}\): square root of the positive number \(4ac - b^2\) (the discriminant with its sign flipped)
③ times the imaginary unit \(i\) (the number whose square is −1), the two ways of ±,
④ then divide each by \(2a\): twice the \(x^2\) coefficient
⑤ and you get \(x\): two complex solutions (a conjugate pair that differs only in the sign of the imaginary part)
Quick example
The solutions of x² + x + 1 = 0 (a = 1, b = 1, c = 1; discriminant D = 1 − 4 = −3) are
\(x\): two complex solutions \(=\) \((\) opposite of \(b\) (−1) \(\pm\) square root of \(4ac - b^2 = 3\) \(\,i\) \()\) \(\div\) \((\) twice \(a\) (2) \()\)
\(x = \dfrac{-1 \pm \sqrt{3}\,i}{2} \approx -0.5 \pm 0.866\,i\)
Key idea
When \(D < 0\), the number under the √ is negative. No real number gives a negative number when squared, so there is no solution among the real numbers. So we bring in the imaginary unit \(i\), "the number whose square is −1". Then we can write \(\sqrt{-3} = \sqrt{3}\,i\), and the solutions can be written as two complex numbers. \(4ac - b^2\) is the discriminant \(b^2 - 4ac\) with its sign flipped, and it is always positive when \(D < 0\), so its square root is safe to take.
When \(a = 0\) (it becomes a linear equation)
Graph
Standard notation (the usual math form)
\(x\) \(=\) \(-c\) \(\div\) \(b\)
In words (symbols replaced with words)
③ \(x\): solution of the linear equation \(=\) ① \(-c\): opposite of the constant term \(\div\) ② \(b\): \(x\) coefficient
The formula in words
① Divide \(-c\): opposite of the constant term
② by \(b\): \(x\) coefficient
③ and you get \(x\): solution of the linear equation
Quick example
With a = 0, the solution of 2x + 4 = 0 (b = 2, c = 4) is
\(x\): solution of the linear equation \(=\) opposite of \(c\) (−4) \(\div\) \(b\) (2)
\(x = \dfrac{-4}{2} = -2\)
Key idea
When \(a = 0\), the \(x^2\) term disappears and the equation becomes the linear equation \(bx + c = 0\), not a quadratic. The quadratic formula has \(2a\) in the denominator, so it assumes \(a \neq 0\). This calculator does not treat a = 0 as an error; it solves the linear equation and returns one solution (only when a and b are both 0 is there no equation to solve, and you get an error).
The solutions of the quadratic equation ax² + bx + c = 0 come from putting the coefficients into the quadratic formula, x = (−b ± √(b² − 4ac)) ÷ (2a). The sign of the discriminant D = b² − 4ac, the part under the √, tells you before you calculate whether there are two solutions, one (a double root), or complex solutions.

Symbols and terms

Symbols

\(a, b, c\) a, b, c The coefficients of the quadratic equation. \(a\) is the number in front of \(x^2\), \(b\) is the number in front of \(x\), and \(c\) is the constant term (the number-only term).
\(x\) ex The unknown number you want to find as the solution of the equation. A quadratic equation has at most two solutions.
\(D\) dee (discriminant) The discriminant, \(D = b^2 - 4ac\), from the first letter of "discriminant". Some books write it with the Greek letter \(\Delta\) (delta).
\(\sqrt{\phantom{9}}\) square root The symbol for "the number, 0 or greater, whose square is the number inside". \(\sqrt{25} = 5\) and \(\sqrt{2} \approx 1.414\).
\(\pm\) plus or minus A symbol that writes "both the + case and the − case" at once. In the quadratic formula, it means that both the sum and the difference are solutions.
\(i\) i (imaginary unit) The number whose square is \(-1\) (\(i^2 = -1\)). It is used to write the solutions when the number under the √ is negative.
\(x_1, x_2\) x sub 1, x sub 2 Names for the two solutions. On this page, the + side of ± is \(x_1\) and the − side is \(x_2\).

Terms

quadratic equation An equation with an \(x^2\) (squared) term. It can be written in the form \(ax^2 + bx + c = 0\) (\(a \neq 0\)), called standard form. Taught in Algebra 1.
coefficient The number in front of a letter. In \(3x\), the coefficient is 3. When reading coefficients, watch for hidden 1s and signs: \(x^2 - x = 0\) means a = 1, b = −1, c = 0.
solution A value of the letter that makes the equation true. To "solve" an equation means to find all of its solutions. The solutions of a quadratic are also called its roots.
quadratic formula A formula that calculates the solutions of a quadratic equation directly from the coefficients a, b and c. Its strength is that it always works, even when you cannot see how to factor.
discriminant The part under the √ in the quadratic formula, \(b^2 - 4ac\). Its sign alone tells you the type of solutions (two real solutions, a double root, or two complex solutions).
double root A solution where the two solutions come together as one. It happens when the discriminant is 0, and on the graph the parabola touches the x-axis. It is also called a repeated root.
real solution A solution that is a real number (a number on the ordinary number line). There are real solutions when the discriminant is 0 or greater.
complex solution A solution that is not a real number and is written with the imaginary unit \(i\). When the discriminant is negative, the solutions are a pair of the form "real part ± imaginary part \(i\)", such as \(-0.5 \pm 0.866i\) (complex conjugates). Also called imaginary solutions. Taught in Algebra 2.
completing the square Rewriting an equation in the form \((x + p)^2 = q\) (a square equals a number). Doing this all the way with the letters a, b and c gives the quadratic formula.
factoring Writing an expression as a product. If you can factor \(x^2 + 3x - 4 = (x - 1)(x + 4)\), you get the solutions x = 1, −4 without the quadratic formula.
parabola The shape of the graph of \(y = ax^2 + bx + c\). The real solutions of the quadratic equation are the x-coordinates of the points where this parabola meets the x-axis (the x-intercepts).

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back to review these topics is the fastest way forward.

Arithmetic with negative numbers (Grade 7)
  • Knowing that squaring a negative number gives a positive number, as in \((-5)^2 = 25\)
  • Being able to multiply while keeping track of signs, as in \(-4 \times 1 \times (-4) = +16\)
Square roots (Grade 8)
  • Understanding a square root as "the number whose square is that number", as in \(\sqrt{25} = 5\)
  • Knowing that a square root that does not come out exactly, such as \(\sqrt{2}\), can be written as an approximate decimal
Quadratic equations (Algebra 1)
  • Being able to rewrite an equation in the form \(ax^2 + bx + c = 0\) and read off the coefficients \(a, b, c\) with their signs
  • Being able to check that, for an equation you can factor, the answers match those from the quadratic formula
Graphs of quadratic functions (Algebra 1)
  • Knowing that the graph of \(y = ax^2 + bx + c\) is a parabola
  • Being able to picture the real solutions as "the x-coordinates of the points where the parabola meets the x-axis"

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to find two real solutions with the quadratic formula (when D > 0)
Coefficient a 1
Coefficient b 3
Constant term c -4
Discriminant D = b² − 4ac =B2^2-4*B1*B3
Solution 1, x₁ =(-B2+SQRT(B4))/(2*B1)
Solution 2, x₂ =(-B2-SQRT(B4))/(2*B1)
Table to find the type of solutions from the discriminant
Coefficient a 1
Coefficient b 1
Constant term c 1
Discriminant D = b² − 4ac =B2^2-4*B1*B3
Type of solutions =IF(B4>0,"Two different real solutions",IF(B4=0,"Double root","Two complex solutions"))
Table to find the double root (when D = 0)
Coefficient a 1
Coefficient b 2
Constant term c 1
Double root x =-B2/(2*B1)
Table to find the real and imaginary parts of the two complex solutions (when D < 0)
Coefficient a 1
Coefficient b 1
Constant term c 1
Real part (−b ÷ 2a) =-B2/(2*B1)
Imaginary part (the ± part) =SQRT(4*B1*B3-B2^2)/ABS(2*B1)
Table to find the solution when a = 0 (a linear equation)
Coefficient b 2
Constant term c 4
Solution x =-B2/B1
After pasting, the upper rows (the coefficients a, b and c) are your inputs and the lower rows are calculated automatically.
"^2" means squared, and "SQRT( )" is the function for the square root.
In the first table, for example, you see the discriminant 25, solution 1 = 1 and solution 2 = −4.
The SQRT in the first table only works when D > 0 (if D < 0 you get a #NUM! error; in that case use the fourth table, for complex solutions).

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to find two real solutions with the quadratic formula (when D > 0)
Coefficient a 1
Coefficient b 3
Constant term c -4
Discriminant D = b² − 4ac =B2^2-4*B1*B3
Solution 1, x₁ =(-B2+SQRT(B4))/(2*B1)
Solution 2, x₂ =(-B2-SQRT(B4))/(2*B1)
Table to find the type of solutions from the discriminant
Coefficient a 1
Coefficient b 1
Constant term c 1
Discriminant D = b² − 4ac =B2^2-4*B1*B3
Type of solutions =IF(B4>0,"Two different real solutions",IF(B4=0,"Double root","Two complex solutions"))
Table to find the double root (when D = 0)
Coefficient a 1
Coefficient b 2
Constant term c 1
Double root x =-B2/(2*B1)
Table to find the real and imaginary parts of the two complex solutions (when D < 0)
Coefficient a 1
Coefficient b 1
Constant term c 1
Real part (−b ÷ 2a) =-B2/(2*B1)
Imaginary part (the ± part) =SQRT(4*B1*B3-B2^2)/ABS(2*B1)
Table to find the solution when a = 0 (a linear equation)
Coefficient b 2
Constant term c 4
Solution x =-B2/B1
The same formulas as in Excel work as is. Copy the whole table, paste it into cell A1, and replace the coefficients with the ones from your own equation.

How to calculate it in Python

import math

a = 1.0   # coefficient of x^2
b = 3.0   # coefficient of x
c = -4.0  # constant term

if a == 0 and b == 0:
    print("If a and b are both 0, there is no equation to solve")
elif a == 0:
    # When a = 0, it becomes the linear equation bx + c = 0
    print(f"Solution of the linear equation: x = {-c / b}")
else:
    discriminant = b**2 - 4*a*c  # discriminant D
    print(f"Discriminant D = {discriminant}")
    if discriminant > 0:
        root = math.sqrt(discriminant)
        print(f"Two different real solutions: x1 = {(-b + root) / (2*a)}, x2 = {(-b - root) / (2*a)}")
    elif discriminant == 0:
        print(f"Double root: x = {-b / (2*a)}")
    else:
        real_part = -b / (2*a)
        imaginary_part = math.sqrt(-discriminant) / (2*abs(a))
        print(f"Two complex solutions: x = {real_part} ± {imaginary_part}i")
Runs with the standard library only. "**2" means squared and math.sqrt( ) is the square root. Change a, b and c at the top to the coefficients of your own equation and run it.

How to write it in LaTeX and other math languages (copy and paste)

The quadratic formula
x = (−b ± √(b² − 4ac)) ÷ (2a)
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>x</mi>
    <mo>=</mo>
    <mfrac>
      <mrow>
        <mo>&#x2212;</mo><mi>b</mi>
        <mo>&#xB1;</mo>
        <msqrt>
          <mrow>
            <msup><mi>b</mi><mn>2</mn></msup>
            <mo>&#x2212;</mo>
            <mn>4</mn><mi>a</mi><mi>c</mi>
          </mrow>
        </msqrt>
      </mrow>
      <mrow><mn>2</mn><mi>a</mi></mrow>
    </mfrac>
  </mrow>
</math>
x = (-b +- sqrt(b^2 - 4ac)) / (2a)
Solve[a*x^2 + b*x + c == 0, x]
solve(a*x^2 + b*x + c = 0, x);
x = roots([a b c]);
x = (-b ± √(b^2 - 4ac))/(2a)
The discriminant (tells you the type of solutions)
D = b² − 4ac
D = b^{2} - 4ac
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>D</mi>
    <mo>=</mo>
    <msup><mi>b</mi><mn>2</mn></msup>
    <mo>&#x2212;</mo>
    <mn>4</mn><mi>a</mi><mi>c</mi>
  </mrow>
</math>
D = b^2 - 4ac
b^2 - 4*a*c
d := b^2 - 4*a*c;
d = b^2 - 4*a*c;
D = b^2 - 4ac
Double root (when the discriminant \(D = 0\))
x = −b ÷ (2a)
x = -\frac{b}{2a}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>x</mi>
    <mo>=</mo>
    <mo>&#x2212;</mo>
    <mfrac><mi>b</mi><mrow><mn>2</mn><mi>a</mi></mrow></mfrac>
  </mrow>
</math>
x = -b / (2a)
-b/(2*a)
x := -b/(2*a);
x = -b/(2*a);
x = -b/(2a)
Two complex solutions (when the discriminant \(D < 0\))
x = (−b ± √(4ac − b²) i) ÷ (2a)
x = \frac{-b \pm \sqrt{4ac - b^2}\,i}{2a}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>x</mi>
    <mo>=</mo>
    <mfrac>
      <mrow>
        <mo>&#x2212;</mo><mi>b</mi>
        <mo>&#xB1;</mo>
        <msqrt>
          <mrow>
            <mn>4</mn><mi>a</mi><mi>c</mi>
            <mo>&#x2212;</mo>
            <msup><mi>b</mi><mn>2</mn></msup>
          </mrow>
        </msqrt>
        <mi>i</mi>
      </mrow>
      <mrow><mn>2</mn><mi>a</mi></mrow>
    </mfrac>
  </mrow>
</math>
x = (-b +- sqrt(4ac - b^2) i) / (2a)
{(-b + Sqrt[4*a*c - b^2]*I)/(2*a), (-b - Sqrt[4*a*c - b^2]*I)/(2*a)}
x := [(-b + sqrt(4*a*c - b^2)*I)/(2*a), (-b - sqrt(4*a*c - b^2)*I)/(2*a)];
x = [(-b + sqrt(4*a*c - b^2)*1i)/(2*a), (-b - sqrt(4*a*c - b^2)*1i)/(2*a)];
x = (-b ± √(4ac - b^2) i)/(2a)
When \(a = 0\) (it becomes a linear equation)
x = −c ÷ b
x = -\frac{c}{b}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>x</mi>
    <mo>=</mo>
    <mo>&#x2212;</mo>
    <mfrac><mi>c</mi><mi>b</mi></mfrac>
  </mrow>
</math>
x = -c/b
-c/b
x := -c/b;
x = -c/b;
x = -c/b

How to have ChatGPT  do the calculation

You are a calculation assistant for math. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

Solve the quadratic equation x² + 3x − 4 = 0 with the quadratic formula.
Show each of the following:
1. The value of the discriminant D = b² − 4ac and the type of solutions it shows (two different real solutions, a double root, or two complex solutions)
2. The values of the solutions x (if they are complex, in the form "real part ± imaginary part i")
3. The steps showing how the values are put into the quadratic formula

Show the formulas you used and the numbers from the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.