Solve, simplify, factor, and expand algebraic expressions with step-by-step solutions
Welcome to our free Algebra Calculator, a powerful browser-based tool for solving algebra problems across five major categories: equation solving, expression simplification, polynomial factoring, expression expansion, and 2×2 systems of equations. Whether you are a student working through homework problems, a teacher preparing examples, or a professional who needs quick algebraic computations — this calculator provides instant solutions with step-by-step explanations. Algebra is the branch of mathematics concerned with symbols representing numbers and the rules for manipulating those symbols. It is fundamental to virtually all advanced mathematics, science, and engineering. Mastery of algebra — particularly solving equations, working with polynomials, and understanding linear and quadratic relationships — is essential for calculus, statistics, physics, chemistry, computer science, and economics. The Solve mode handles both linear equations (of the form ax + b = c, with one solution) and quadratic equations (of the form ax² + bx + c = 0, with up to two solutions). For linear equations, the calculator isolates the variable through a sequence of inverse operations. For quadratic equations, it applies the quadratic formula: x = [-b ± √(b² - 4ac)] / 2a. The discriminant (b² - 4ac) determines the nature of the roots — positive discriminant gives two distinct real roots, zero discriminant gives exactly one real root (a repeated root), and negative discriminant gives no real roots (the equation has complex solutions). The calculator shows which case applies and displays the discriminant value. The Solve mode also handles linear inequalities with proper direction flipping when dividing by a negative coefficient. The Simplify mode evaluates and reduces arithmetic expressions, combines like terms, simplifies fractions and rationals, and reduces polynomial expressions. Enter any valid algebraic expression and the calculator will return it in its simplest equivalent form. The Factor mode decomposes polynomial expressions into their prime polynomial factors. For quadratics ax² + bx + c, factoring reveals the two binomial factors (x - r₁)(x - r₂) where r₁ and r₂ are the roots. Factoring is essential for solving equations, simplifying rational expressions, and understanding the structure of polynomials. The calculator handles perfect square trinomials, difference of squares, and general quadratic trinomials. The Expand mode distributes and multiplies out expressions in factored form, such as (x + 3)(x - 2) → x² + x - 6. This is the inverse operation of factoring. Expansion is used to convert products of binomials and trinomials into standard polynomial form, and to apply the distributive property in more complex multi-term expressions. The Systems mode solves 2×2 systems of two linear equations in two unknowns (typically x and y) using substitution and elimination methods. Enter each equation on separate lines and the calculator finds the x and y values satisfying both equations simultaneously. Systems of equations model real-world problems where two constraints must be satisfied at once — such as mixture problems, rate problems, and break-even analysis in business. For all modes, the step-by-step solution panel shows each transformation applied to reach the answer, with rule names identifying the algebraic operation used (distributive property, combining like terms, isolating the variable, applying the quadratic formula, etc.). These steps make it possible to learn the solution process, not just the answer. All calculations run entirely in your browser using a built-in algebraic parser. No data is sent to any server.
Understanding Algebra
What Are Linear and Quadratic Equations?
A linear equation is an equation where the variable appears to the first power only (no x², x³, etc.). It takes the standard form ax + b = c and has exactly one solution: x = (c - b) / a. Linear equations model constant-rate relationships — distance, cost, time, and simple interest problems. A quadratic equation has the variable to the second power as its highest degree: ax² + bx + c = 0. It can have zero, one, or two real solutions depending on the value of the discriminant (b² - 4ac). Quadratic equations model parabolic relationships including projectile motion, area problems, and optimization. The quadratic formula x = [-b ± √(b² - 4ac)] / 2a gives the solutions directly for any quadratic equation.
How Does the Calculator Work?
The calculator uses a custom algebraic parser that tokenizes and evaluates mathematical expressions. For equation solving, it identifies the equation type (linear or quadratic) by detecting the highest degree term, then applies the appropriate solution method. Linear equations are solved by isolating the variable through inverse operations: moving constants to one side and dividing by the coefficient of the variable. Quadratic equations are solved using the quadratic formula. For factoring, the calculator identifies the factoring pattern (difference of squares, perfect square trinomial, or general quadratic) and applies the corresponding technique. For systems of equations, it uses substitution: solving one equation for one variable and substituting into the second. Step-by-step rules are recorded at each transformation.
Why Algebra Skills Matter
Algebra is the gateway to all higher mathematics and quantitative sciences. Solving equations is fundamental to any problem where an unknown quantity must be found from known relationships — calculating the break-even point in a business model, finding the time until two moving objects meet, determining the dimensions of a shape given its area, or finding concentrations in a chemistry mixture problem. Factoring and working with polynomials is prerequisite knowledge for calculus, where differentiation and integration of polynomial functions are foundational operations. Systems of equations are used throughout economics (supply and demand equilibrium), engineering (circuit analysis), and data science (linear regression and optimization). Building fluency in algebraic manipulation is one of the highest-return investments in mathematical education.
Scope and Limitations
This calculator handles linear equations, quadratic equations, linear inequalities, polynomial simplification, basic factoring (quadratic and linear polynomials), expansion of binomial and polynomial products, and 2×2 linear systems. It does not handle cubic or higher-degree polynomial equations (degree 3+), partial fraction decomposition, matrix operations beyond 2×2 systems, differential equations, symbolic integration or differentiation, or trigonometric and logarithmic equations. Complex number roots (when the discriminant is negative) are identified but not numerically computed. For expressions that cannot be parsed or are outside the supported scope, an error message is shown and the input can be refined using the example chips as guides to valid input formats.
Key Algebra Formulas
Linear Equation Solution
ax + b = 0 → x = −b/a
A linear equation in one variable is solved by isolating x: subtract the constant from both sides and divide by the coefficient of x.
Difference of Squares
a² − b² = (a + b)(a − b)
Any binomial that is the difference of two perfect squares factors into the product of their sum and their difference. This is one of the most commonly used factoring identities.
Perfect Square Trinomial
a² ± 2ab + b² = (a ± b)²
A trinomial where the first and last terms are perfect squares and the middle term is twice the product of their square roots factors into a binomial squared.
FOIL Method (Binomial Product)
(a + b)(c + d) = ac + ad + bc + bd
To expand the product of two binomials, multiply the First, Outer, Inner, and Last terms, then combine like terms.
Algebra Reference Tables
Common Algebraic Identities
Essential identities used in factoring, expanding, and simplifying algebraic expressions.
| Identity Name | Formula |
|---|---|
| Difference of Squares | a² − b² = (a + b)(a − b) |
| Perfect Square (sum) | a² + 2ab + b² = (a + b)² |
| Perfect Square (diff) | a² − 2ab + b² = (a − b)² |
| Sum of Cubes | a³ + b³ = (a + b)(a² − ab + b²) |
| Difference of Cubes | a³ − b³ = (a − b)(a² + ab + b²) |
| Binomial Expansion | (a + b)² = a² + 2ab + b² |
| Quadratic Formula | x = (−b ± √(b²−4ac)) / 2a |
Exponent Rules Reference
Rules governing operations with exponents, essential for simplifying algebraic expressions.
| Rule | Formula | Example |
|---|---|---|
| Product Rule | xᵃ · xᵇ = xᵃ⁺ᵇ | x³ · x² = x⁵ |
| Quotient Rule | xᵃ / xᵇ = xᵃ⁻ᵇ | x⁵ / x² = x³ |
| Power Rule | (xᵃ)ᵇ = xᵃᵇ | (x²)³ = x⁶ |
| Zero Exponent | x⁰ = 1 | 5⁰ = 1 |
| Negative Exponent | x⁻ᵃ = 1/xᵃ | x⁻² = 1/x² |
| Distributive Power | (xy)ᵃ = xᵃyᵃ | (2x)³ = 8x³ |
Worked Examples
Factor x² − 5x + 6
Factor the quadratic trinomial x² − 5x + 6 into two binomials.
Find two numbers that multiply to +6 and add to −5
The numbers are −2 and −3 (since (−2)(−3) = 6 and (−2) + (−3) = −5)
Write the factored form: (x − 2)(x − 3)
Verify by expanding: x² − 3x − 2x + 6 = x² − 5x + 6 ✓
x² − 5x + 6 = (x − 2)(x − 3)
Expand (2x + 3)(x − 4) Using FOIL
Use the FOIL method to expand the product of two binomials.
First: 2x · x = 2x²
Outer: 2x · (−4) = −8x
Inner: 3 · x = 3x
Last: 3 · (−4) = −12
Combine like terms: 2x² − 8x + 3x − 12 = 2x² − 5x − 12
(2x + 3)(x − 4) = 2x² − 5x − 12
Solve 3x + 7 = 22
Solve the linear equation 3x + 7 = 22 for x using inverse operations.
Subtract 7 from both sides: 3x + 7 − 7 = 22 − 7
Simplify: 3x = 15
Divide both sides by 3: x = 15 / 3
Simplify: x = 5
x = 5. Verify: 3(5) + 7 = 15 + 7 = 22 ✓
How to Use the Algebra Calculator
Select Your Calculation Mode
Choose from five modes: Solve (for equations like 2x + 5 = 13 or x^2 - 4 = 0), Simplify (to reduce expressions to simplest form), Factor (to decompose polynomials like x^2 + 5x + 6 into factors), Expand (to distribute products like (x+3)(x-2)), or Systems (to solve two simultaneous linear equations). The mode determines how the expression is interpreted and processed.
Enter Your Expression
Type your mathematical expression using standard notation. Use * for multiplication (e.g. 2*x), ^ for exponents (e.g. x^2), and sqrt() for square roots. Use = to write an equation. Click the symbol buttons below the input field to insert special characters, or click any of the example chips to load a sample expression for that mode.
Review the Solution
The answer appears instantly at the top of the results panel. For quadratic equations, the root analysis section shows the discriminant value and classifies the roots (two real, one real, or no real roots). A formula reference box shows any formula applied. For inequalities, a number line visualization shows the solution set graphically.
Expand Step-by-Step Solution
Click the Step-by-Step Solution accordion to see every transformation applied to reach the answer, with the algebraic rule identified at each step. Use this to learn the solution process or verify your own manual work. Export the solution to CSV to save the expression, answer, and step-by-step breakdown, or copy the answer directly to your clipboard.
Frequently Asked Questions
How do I enter a quadratic equation?
Enter quadratic equations in Solve mode using the format ax^2 + bx + c = 0. For example: x^2 - 5x + 6 = 0, or 2x^2 + 3x - 2 = 0. Use the ^ symbol for exponents — you can click the ^ button in the symbol toolbar or type it directly. You can also enter a quadratic that has been rearranged, such as x^2 = 4 or x^2 + 2x = 8, and the calculator will rearrange it to standard form before solving. The calculator will display the discriminant, classify the root type (two real roots, one repeated root, or no real roots), and show both values of x when real solutions exist.
What is the quadratic formula and when is it used?
The quadratic formula is x = [-b ± √(b² - 4ac)] / (2a), where a, b, and c are the coefficients of the quadratic equation ax² + bx + c = 0. It is used when a quadratic cannot be factored easily or when you need exact solutions. The expression b² - 4ac under the square root is called the discriminant. If the discriminant is positive, there are two distinct real roots. If it equals zero, there is one repeated root (x = -b/2a). If the discriminant is negative, there are no real roots — the solutions are complex (involving the imaginary number i). The quadratic formula works for any quadratic equation regardless of whether it factors nicely.
How do I solve a system of two equations?
Switch to Systems mode, enter the first equation in the main input field (e.g. 2x + y = 10), and the second equation in the Equation 2 field (e.g. x - y = 2). The calculator solves the system using substitution: it isolates one variable from one equation and substitutes into the other. The result shows the values of both x and y that satisfy both equations simultaneously. A system has a unique solution when the two lines represented by the equations intersect at exactly one point, no solution when the lines are parallel, and infinitely many solutions when the two equations represent the same line.
What does factoring a polynomial mean?
Factoring a polynomial means expressing it as a product of simpler polynomial factors. For example, x² + 5x + 6 factors into (x + 2)(x + 3), because multiplying those binomials gives back the original expression. Factoring is the reverse of expanding. It is useful for solving polynomial equations (set each factor equal to zero to find the roots), simplifying rational expressions (canceling common factors from numerator and denominator), and understanding the behavior of polynomial functions. The calculator handles quadratic trinomials, difference of squares (a² - b² = (a+b)(a-b)), and linear expressions. Enter your polynomial in Factor mode and the calculator returns the factored form with step-by-step explanation.
What is the difference between simplifying and expanding?
Simplifying reduces an expression to its most compact equivalent form by combining like terms, reducing fractions, and applying arithmetic. For example, 3x + 2x - 4 simplifies to 5x - 4. Expanding takes an expression in factored or product form and distributes multiplication to convert it into a sum of terms. For example, (x + 3)(x - 2) expands to x² + x - 6 using the FOIL method (First, Outer, Inner, Last). They are inverse operations: factoring is the reverse of expanding, and simplification reduces the complexity of an already-expanded expression. Use Simplify mode for reducing expressions that are already written as sums and differences. Use Expand mode to distribute products of binomials or polynomials.
How are linear inequalities solved differently from equations?
Linear inequalities are solved using the same inverse operations as linear equations, with one critical difference: when you multiply or divide both sides by a negative number, the direction of the inequality reverses. For example, solving -2x > 8 requires dividing by -2, which flips the > to <, giving x < -4. The calculator handles this automatically and shows the step where the flip occurs. The solution to a linear inequality is a range of values rather than a single number. The number line visualization shows the solution set graphically, using an open circle for strict inequalities (< or >) where the boundary value is not included, and a closed circle for non-strict inequalities (≤ or ≥) where the boundary value is included in the solution.
Related Tools
Equation Solver
Solve single-variable equations including linear, quadratic, and polynomial types.
Linear Equation Solver
Solve linear equations in any form with graphing and step-by-step solutions.
Cubic Equation Solver
Find all three roots of cubic equations with discriminant analysis and Cardano's method.
Derivative Calculator
Compute derivatives of algebraic, trigonometric, and transcendental functions step by step.
Logarithm Calculator
Calculate logarithms in any base including natural log, common log, and binary log.