GenerateRandomSearch

Quadratic Equation Generator

Choose the method first, because it decides what kind of quadratic you get. For factorising, the equation is built from a pair of whole-number roots and multiplied out, so every one factorises over the integers — the property a practice question needs and a randomly chosen set of coefficients almost never has. For the formula or for completing the square, the equation is drawn so that it does not factorise: the discriminant is positive and not a square number, and the answer is a surd such as 2 ± √11. The discriminant is reported alongside, because it is the number that tells you what kind of answer to expect before you find it, and because a repeated root — where the discriminant is zero — is easy to mistake for a mistake.

What this generator does

For factorising, picks two roots, multiplies out a(x − p)(x − q), and presents the result as an equation to solve: the roots came first, so the answer is exact, the discriminant is a perfect square and the factorised form is known rather than searched for. For the formula or completing the square, draws coefficients until the discriminant is positive and not a square, then gives the roots in simplified surd form, with each to two decimal places beside it.

How to use this tool

  1. Choose how many quadratics you want, the level, and the method: factorising, the formula or completing the square.
  2. Solve each by that method. The formula and completing-the-square questions ask for the answer in surd form.
  3. Reveal the answers to check the roots you found.
  4. Show the working to see the discriminant and the factorised form, the formula with the surd simplified, or the square completed step by step.

Understanding the controls

How many questions
Between 1 and 20. Five is a reasonable set when each one is being solved two ways, by factorising and by formula.
Level
Gentle and standard keep the x squared coefficient at one. At stretch, factorising and formula questions usually have a leading coefficient other than one, which needs grouping or care with 2a; completing-the-square questions always start with x² and grow larger numbers instead.
Method
Factorising gives whole-number roots. The quadratic formula gives equations that do not factorise, answered in surd form such as (5 ± √73)/2. Completing the square gives x² plus an even multiple of x, answered in the form 2 ± 2√2.
Seed
Reproduces the same set of quadratics from the same word.
Show the answers / working
The roots alone, or the discriminant and the factorised form as well.

Common use cases

  • Practice at factorising where every question is guaranteed to factorise
  • Drilling the quadratic formula on equations that do not factorise, with the surd simplified in the answer
  • Completing the square on equations with an even x coefficient, the case it is taught on
  • Showing what a zero discriminant looks like as an equation rather than as a rule
  • Stretch questions where the x squared coefficient is usually not one
  • Generating a set of equations to test a solver against

How this generator works

For factorising, two roots p and q are drawn, and a leading coefficient a at the stretch level; the equation is a(x − p)(x − q) = 0 expanded to ax² + bx + c, and the check substitutes each stated root back using exact fractions and confirms the result is exactly zero. For the surd methods the check works twice: exactly, by cross-multiplying whole numbers to confirm the answer is (−b ± √(b² − 4ac)) / 2a with the square factor taken out of the root and nothing left to cancel; and by substituting the two decimal roots back into the equation. Either way b² − 4ac is recomputed against the discriminant shown, and a question that fails is flagged on the page.

Randomness and fairness

The roots, or for the surd methods the coefficients, are random; that a factorising question factorises and that a surd question does not are properties of how each was built, not of chance. A seeded set is reproducible and therefore explicitly not cryptographically secure. Unseeded, the browser's cryptographically secure generator supplies the draws.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • Roots are real: whole numbers when factorising, surds for the other two methods. Complex roots never appear, and a surd question is never one that also factorises.
  • Roots are drawn independently, so a repeated root turns up only occasionally rather than on demand.
  • The question is always set equal to zero. Rearranging from a form like x² = 5x − 6 is a separate skill this does not cover.
  • There is no graph of the curve, so where it crosses the x-axis is not shown.
  • A generated set is not saved, so seed one before you print it.

Privacy and your data

Every equation is built in your browser from your own choices. The set you generate is not sent anywhere or retained; what is measured is that a set was made and how many equations it has.