ForHosting KIT · Math

Solve quadratic by factoring

Factor a quadratic the way your textbook does: x² − 5x + 6 becomes (x − 2)(x − 3), so the roots are 2 and 3. When no integer factoring exists, you are told so plainly. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
A
1
B
-5
C
6
You get
Equation
x^2 - 5*x + 6 = 0
Polynomial
x^2 - 5*x + 6
Discriminant
1
Content
1

Solving a quadratic by factoring means rewriting a times x squared plus b times x plus c as a product of two degree-one binomials with integer coefficients, setting that product equal to zero, and applying the zero-product property so each binomial contributes a root. This calculator accepts three integer coefficients a, b, and c for the equation ax squared plus bx plus c equals zero, rejects a zero leading coefficient so the problem stays genuinely quadratic, and either returns an explicit factored form such as open parenthesis x minus two close parenthesis open parenthesis x minus three close parenthesis together with the ordered roots, or reports honestly that the trinomial does not factor over the integers. Classic classroom checks include x squared minus five x plus six becoming open parenthesis x minus two close parenthesis open parenthesis x minus three close parenthesis with roots two and three, six x squared plus five x plus one becoming open parenthesis two x plus one close parenthesis open parenthesis three x plus one close parenthesis with roots negative one half and negative one third, and x squared plus one remaining non-factorable over the integers even though complex roots exist.

How solving by factoring and the zero-product property work

A quadratic equation ax squared plus bx plus c equals zero can be solved by factoring when the left-hand side factors into a constant content times two linear binomials with integer coefficients. Algebraically that is the same condition as the discriminant being a perfect square for integer a, b, and c, which guarantees rational roots that, after clearing denominators, produce integer binomial factors via the reverse of FOIL or the AC method.

The calculator first verifies that a, b, and c are finite integers within the safe integer range and that a is not zero.

It then peels off a content factor equal to the greatest common divisor of the three coefficients, preserving sign so the leading factor prefers a positive first binomial coefficient when possible, and searches divisor pairs: the reduced leading coefficient splits as p times r and the reduced constant splits as q times s so that the cross identity p s plus q r equals the reduced linear coefficient.

When such integers exist, the equation becomes content times open parenthesis p x plus q close parenthesis times open parenthesis r x plus s close parenthesis equals zero. Because content is nonzero, the zero-product property says that either p x plus q equals zero or r x plus s equals zero, which yields the roots x equals negative q over p and x equals negative s over r.

When no divisor pair works, the response marks factorable false and explains that integer factoring failed, pointing the user toward the quadratic formula or completing the square rather than inventing irrational or complex factors that the factoring method does not produce. Special cases are handled cleanly: if c is zero then x is an explicit factor; if the two roots coincide the solution list contains a single value for a repeated root.

Where a solve-by-factoring calculator earns its keep

Secondary-school and college algebra courses assign solve-by-factoring, reverse-FOIL, and AC-method drills before they introduce the quadratic formula; a single trusted oracle that returns both the binomial product and the roots from the zero-product property speeds grading and demo setup without skipping the method the rubric requires. Exam generators need a deterministic tool that distinguishes factorable integer trinomials from cases where students must switch methods, so auto-graders can accept factoring answers only when factorable is true and mark the rest as requiring formula work.

Programming contest warm-ups and interview screens often hide a factorable quadratic inside integer constraints, and engineers need the integer binomial form and exact rational roots rather than floating formula output that rounds poorly. Curriculum authors building interactive lessons want the same shape for monic and non-monic leading coefficients, repeated roots when the discriminant is zero, and an honest non-factorable flag for x squared plus one style examples.

If you later need unrestricted complex roots, symbolic factoring over the rationals without solving, or the full quadratic formula with vertex data, treat those as separate search intents and landings rather than overloading this solve-by-factoring page.

AC-method and reverse-FOIL drills

Check classroom solve-by-factoring steps against divisor-pair factorizations with integer content, including non-monic leading coefficients and repeated roots.

LMS auto-grading of method choice

Accept factoring-based student answers only when factorable is true; route non-factorable items to a quadratic-formula grader instead of inventing roots.

What happens if the quadratic does not factor over the integers?

The response succeeds with factorable set to false and a note that integer factoring failed. That is not an error; use the quadratic formula or complete the square for those roots.

Why must a, b, and c be integers?

Solve-by-factoring over the integers is the classroom method this page targets.

How do I solve x² − 5x + 6 = 0 by factoring?

Find two numbers that multiply to 6 and add to −5: they are −2 and −3. Then x² − 5x + 6 = (x − 2)(x − 3), and setting each factor to zero gives the roots 2 and 3.

Can it factor when a is not 1?

Yes. For 6x² + 5x + 1 it finds (2x + 1)(3x + 1), so the roots are −1/2 and −1/3. A common factor shared by all three coefficients is taken out first.

How can I tell in advance whether a quadratic factors?

Work out the discriminant b² − 4ac. With whole-number coefficients the trinomial factors over the integers exactly when the discriminant is a perfect square; for x² − 5x + 6 it is 1.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/algebra/quadratic-by-factoring

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/algebra/quadratic-by-factoring \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a":1,"b":-5,"c":6}'
{
  "a": 1,
  "b": -5,
  "c": 6
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "algebra.quadratic_by_factoring",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

The free browser tool and the paid API share one pure deterministic function, so homework demos, answer keys, and automation pipelines never disagree on the same coefficients.

How solving by factoring and the zero-product property work

The entire path is deterministic with no random seeds, clocks, or network calls, so identical coefficients always produce identical JSON.

Input contract, response shape, and when factoring fails

On success when factoring over the integers fails, the body still returns the equation, polynomial, and discriminant with factorable false and a note that the discriminant is not a perfect square or no integer divisor pair works, without inventing roots that the factoring method cannot justify. That non-factorable success path is intentional: reporting that classroom factoring does not apply is a valid answer, not a validation error. Classic checks: a equals one, b equals negative five, c equals six yields factored form open parenthesis x minus two close parenthesis open parenthesis x minus three close parenthesis and roots two and three; a equals two, b equals three, c equals one yields open parenthesis x plus one close parenthesis open parenthesis two x plus one close parenthesis and roots negative one and negative one half; a equals one, b equals zero, c equals one is not factorable over the integers. Wire the free browser form for homework and quick sanity checks, then call the identical contract from scripts when you need bulk answer keys. POST a JSON body with three required integer fields a, b, and c representing the coefficients of a x squared plus b x plus c equals zero. Each field may arrive as a JSON number or as a numeric string that rounds cleanly to an integer; non-finite values, missing fields, empty strings, and non-integers fail with invalid_input naming the field and are not charged. On success when factoring works, the body echoes a, b, and c; printable equation and polynomial strings; the discriminant; factorable true; content; an array factors of two objects each with coeff_x, const, and a binomial string; factored_form and equation_factored for display; solution_count; roots sorted ascending with stable twelve-significant-digit rounding; a short zero_product reminder; and a note. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.

Where a solve-by-factoring calculator earns its keep

Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.

Homework and exam answer keys

Generate exact binomial factors and zero-product roots for textbook ax²+bx+c=0 sets, or an honest non-factorable flag when integer factoring does not apply.

How do I solve a quadratic by factoring with this calculator?

Send integer coefficients a (non-zero), b, and c for ax²+bx+c=0. When the trinomial factors over the integers, the API returns the factored form and both roots from the zero-product property.

How are the roots obtained from the factors?

If content·(p x + q)(r x + s) = 0 and content ≠ 0, then p x + q = 0 or r x + s = 0, so x = −q/p and x = −s/r. Roots are returned sorted ascending.

What does the solve-quadratic-by-factoring calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →