Free Tools · Math & School
Math Solver
Solve quadratic equations, factor expressions and numbers, and solve linear equations — with every step shown so you can follow the working.
x² − 5x + 6 = 0
Solutions
x = 3, x = 2
D > 0: two real roots · D = 1
Vertex (2.5, −0.25) · opens up · axis x = 2.5
Step by step
- Equation: x² − 5x + 6 = 0, so a = 1, b = −5, c = 6
- Discriminant: D = b² − 4ac = (−5)² − 4(1)(6) = 25 − 24 = 1
- Quadratic formula: x = (−b ± √D) / 2a = (5 ± √1) / 2
- √1 = 1, so x = (5 + 1) / 2 = 3 or x = (5 − 1) / 2 = 2
- Vertex: x = −b / 2a = 2.5; y = c − b²/4a = −0.25, so the vertex is (2.5, −0.25) = (5/2, −1/4)
- a > 0, so the parabola opens upward and the vertex is a minimum. Axis of symmetry: x = 2.5
Quadratic equation solver
A quadratic equation has the form ax² + bx + c = 0 with a ≠ 0. The solver uses the quadratic formula:
x = (−b ± √(b² − 4ac)) / 2a
It first works out the discriminant D = b² − 4ac. A positive D gives two real roots, zero gives one repeated root, and a negative D gives a pair of complex roots −b/2a ± (√−D / 2a)i. For whole-number coefficients the solver also simplifies the square root to give the exact answer — for example √40 = 2√10.
It also finds the vertex of the parabola y = ax² + bx + c at x = −b/2a, y = c − b²/4a. The parabola opens upward when a > 0 (the vertex is the minimum) and downward when a < 0 (the vertex is the maximum).
Factoring calculator
The factoring calculator checks, in order:
- Greatest common factor (GCF) — divide every coefficient by the largest number that goes into all of them, e.g. 3x² + 6x + 3 = 3(x² + 2x + 1).
- Common factor of x when there is no constant term: 2x² − 8x = 2x(x − 4).
- Difference of squares: a² − b² = (a + b)(a − b), e.g. 4x² − 9 = (2x + 3)(2x − 3).
- Perfect square trinomials: a² ± 2ab + b² = (a ± b)², e.g. 9x² − 12x + 4 = (3x − 2)².
- The AC method for everything else: find two numbers that multiply to a·c and add to b, split the middle term with them, and factor by grouping.
A quadratic with integer coefficients can be factored over the integers exactly when b² − 4ac is a perfect square. If it isn't, the calculator tells you the expression is prime.
Prime factorization
To factor a whole number into primes, the calculator divides by 2 as many times as possible, then by 3, 5, 7 and so on, stopping once the divisor squared is larger than what's left. Anything greater than 1 left at the end is itself prime. Repeated factors are written with exponents: 360 = 2³ × 3² × 5.
Algebra and linear equation solver
A linear equation in one variable can always be rearranged to ax = b. The solver reads each side of the equation, expands brackets and combines like terms until each side is in the form (number)·x + (number). Then it:
- moves the variable terms to the left by subtracting the right-hand variable term from both sides,
- moves the constants to the right by subtracting the left-hand constant from both sides, and
- divides both sides by the coefficient of the variable.
Arithmetic is done with exact fractions, so 0.5x − 1.25 = 2 gives x = 13/2 rather than a rounded decimal. Finally the answer is substituted back into the original equation as a check.
Worked examples
Example 1: Solve 2x² + 4x − 3 = 0
Here a = 2, b = 4, c = −3. The discriminant is 4² − 4(2)(−3) = 16 + 24 = 40, which is positive, so there are two real roots. x = (−4 ± √40) / 4. Since √40 = 2√10, this simplifies to x = (−2 ± √10) / 2, or about 0.5811 and −2.5811. The vertex is at x = −4 / 4 = −1, y = −3 − 16/8 = −5, so (−1, −5).
Example 2: Factor 6x² + 11x − 10
The coefficients have no common factor. a·c = 6 × (−10) = −60, and the two numbers that multiply to −60 and add to 11 are 15 and −4. Split the middle term: 6x² + 15x − 4x − 10. Group: 3x(2x + 5) − 2(2x + 5). The common binomial gives (3x − 2)(2x + 5). Multiplying back out: 6x² + 15x − 4x − 10 ✓.
Example 3: Solve 2(x − 3) = 4x + 1
Expand the bracket: 2x − 6 = 4x + 1. Subtract 4x from both sides: −2x − 6 = 1. Add 6 to both sides: −2x = 7. Divide by −2: x = −7/2 = −3.5. Check: 2(−3.5 − 3) = 2(−6.5) = −13, and 4(−3.5) + 1 = −13 ✓.
Frequently asked questions
What kinds of problems can this math solver handle?
Three kinds: quadratic equations of the form ax² + bx + c = 0, factoring of quadratic and linear expressions with whole-number coefficients (plus prime factorization of whole numbers), and linear equations in one variable such as 3x + 5 = 2x − 7, including brackets and fractions.
What does the discriminant tell you?
The discriminant D = b² − 4ac tells you what kind of roots a quadratic has before you solve it. If D > 0 there are two different real roots; if D = 0 there is one repeated real root; if D < 0 there are no real roots, only two complex roots. If D is a perfect square and the coefficients are integers, the quadratic also factors neatly.
Why does it say my quadratic can't be factored?
A quadratic with whole-number coefficients factors over the integers only when its discriminant is a perfect square (0, 1, 4, 9, 16…). For example, x² − 2x − 4 has D = 20, so it is prime over the integers. It still has real roots — use the quadratic tab to find them.
How do I type an equation for the linear solver?
Type it as you'd write it: 3x + 5 = 2x - 7, 2(x - 3) = 4x + 1 or x/4 + 2 = 7. A number next to a variable or bracket means multiply. Use any single letter as the variable. The solver reads the equation with its own small parser — nothing you type is run as code.
What does "no solution" or "all real numbers" mean?
If the variable cancels out completely, two things can happen. If what's left is false (like 1 = 3), no value works, so there is no solution. If it's true (like 1 = 1), the two sides are the same expression and every value works.
Can it solve equations with x² using the linear tab?
No — the linear tab stops and tells you if the variable is squared or multiplied by itself. Rearrange the equation to ax² + bx + c = 0 and enter a, b and c on the quadratic tab.