Factoring Calculator – Factor Quadratics Step by Step

Give it a, b and c and it splits the quadratic into its factors, step by step.

100% FreeNo sign-up neededInstant results

Factor a quadratic

Whole numbers only, and a cannot be 0 — without an x² term it is not a quadratic. Negative numbers are welcome; a negative a is tidied up first, and the steps say so.

🔒 Everything is calculated in your browser — nothing you enter leaves your device.

Advanced options — cubic factorisation (rational roots)

—

Only cubics with a rational root factor this way. If none exists, the panel says so honestly instead of inventing factors.

Enter a cubic with integer coefficients. The panel searches rational roots, divides them out, and factors what is left — the same method the worked example below follows by hand.

Cubic factorisation (rational roots) are already included in the result with their default values — open Advanced options to change them.

The factorisation

Factored form of x² + 5x + 6
(x + 2)(x + 3)
Roots: x = −2 and x = −3

Step by step

Take out the greatest common factor1 − nothing is shared by all three terms
Multiply a × c1 × 6 = 6
Two numbers that multiply to 6 and add to 52 and 3
Split the middle termx² + 3x + 2x + 6
Group the pairsx(x + 3) + 2(x + 3)
Factored form(x + 2)(x + 3)
Check: (x + 2)(x + 3) expands back to x² + 5x + 6 — exactly what you typed. That expansion is verified on every calculation.

How to read this

Multiply the answer back out and you land exactly on x² + 5x + 6 — that expansion check runs on every result this page produces. The roots listed above are where the expression equals zero: one for each bracket, each found by setting that bracket to zero and solving.

Copied ✓

Give it the three numbers of any quadratic — the a, b and c of ax² + bx + c — and it splits the expression into its factors in front of you: the shared factor first, then the pair of numbers hiding inside the middle term, then the grouping that produces the two brackets. If a quadratic refuses to factor, this page says so honestly and hands you the exact roots instead. And if the thing you want broken down is a plain whole number, the second calculator reduces it to its prime factors and lists every factor it has.

Key takeaways

  • Always take out the greatest common factor first: factoring what is left is easier, and the answer is incomplete without it.
  • The AC method turns any factorable quadratic into a grouping problem: two numbers with product a×c and sum b.
  • Prime factorisation is unique: every whole number has exactly one fingerprint of primes, and every divisor is built from it.

Factor a whole number

Any whole number up to 999,999,999,999. A negative number is factored by its size, with the −1 carried in front where it belongs.

🔒 Everything is calculated in your browser — nothing you enter leaves your device.

The factors

Prime factorisation of 360
2³ × 3² × 5
360 has 24 factors, in 12 pairs.

The breakdown

Written out in full2 × 2 × 2 × 3 × 3 × 5
Number of factors24
Factor pairs(1, 360), (2, 180), (3, 120), (4, 90), (5, 72), (6, 60), (8, 45), (9, 40), (10, 36), (12, 30), (15, 24), (18, 20)
All the factors, in order1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360
Count check: add one to each exponent in 2³ × 3² × 5 and multiply: (3 + 1)(2 + 1)(1 + 1) = 24 factors.

How to read this

The prime factorisation is the number’s fingerprint — every whole number has exactly one. Every divisor in the list is just those primes recombined within their exponents; nothing outside the fingerprint can divide the number, and everything inside it does.

Copied ✓

The factoring diamond

The whole method on one picture. The top is a × c, the bottom is b, and the two sides are the pair of numbers that multiplies to the top and adds to the bottom — the pair the middle term splits into.

MULTIPLY · A × C 6 ADD TO · B 5 2 3

For x² + 5x + 6: the top is 1 × 6 = 6, the bottom is the middle coefficient 5, and the sides are 2 and 3 — the pair that multiplies to the top and adds to the bottom. Those two numbers are what the middle term splits into.

The one idea underneath all of it

Factoring is multiplication read backwards. (x + 2)(x + 3) multiplies out to x² + 5x + 6, so the factored form is not a different thing from the quadratic — it is the same expression wearing its structure on the outside: the roots visible, the behaviour readable. Every method on this page, the diamond included, is just a systematic way of running that multiplication in reverse.

Factoring in three steps

1

Take out what is shared

Before anything clever, look for a factor that all three terms have in common — a number, an x, or both — and pull it out front. Skipping this step is the most common reason a factorisation stalls halfway.

2

Split the middle term

Multiply a by c, then hunt for two numbers that multiply to that product and add to b. That pair turns the middle term into two terms — and a three-term problem into a four-term one that can be grouped.

3

Group, collect, check

Group the four terms in twos, factor each pair, and the same bracket appears twice — collect it and you are done. Then expand the answer back: if it does not reproduce the original quadratic, it is wrong, however tidy it looks.

How the factoring calculator works

factoring = running (x + p)(x + q) = x² + (p + q)x + pq backwards

The example on this page. x² + 5x + 6. Here a × c = 6, and the pair 2 and 3 multiplies to 6 and adds to 5. Split the middle term: x² + 3x + 2x + 6. Group: x(x + 3) + 2(x + 3). Collect the shared bracket: (x + 2)(x + 3).

When a is not 1. 2x² + 7x + 3. Now a × c is still 6, but the pair is 1 and 6. Split 7x into 6x + x: 2x² + 6x + x + 3. Group: 2x(x + 3) + (x + 3). Answer: (2x + 1)(x + 3) — the a has been absorbed into the first bracket, which is exactly what the pair being 1 and 6 arranged.

A difference of squares. x² − 4 has b = 0, and the pair is 2 and −2: they multiply to −4 and add to nothing. So x² − 4 = (x − 2)(x + 2). Any squares-minus-squares pattern, x² − k², factors the same way, as (x − k)(x + k).

The shared factor first. 6x² + 9x. Both terms carry 3x, so it comes out front: 3x(2x + 3), and what is left has c = 0 — nothing more to split. A missing constant term always means an x comes out; it is the same move as spotting the shared factor, one level down.

When it will not factor. x² + 2x + 5. The pair hunt needs two numbers multiplying to 5 and adding to 2; the candidates 1 and 5 add to 6, and −1 and −5 add to −6, so no pair exists. The discriminant settles it: 2² − 4 × 5 = −16, negative, so the roots are complex — −1 ± 2i — and the quadratic is prime over the integers.

The number side. 360, divided down: halve three times (360, 180, 90, 45), divide by 3 twice (45, 15, 5), then by 5 once, leaving 1. So 360 = 2³ × 3² × 5, and its factor count is (3 + 1)(2 + 1)(1 + 1) = 24 — every factor is some allowed combination of those primes, and there are 24 combinations.

Going deeper

Multiply two brackets out and watch where each term is born: (x + p)(x + q) = x² + px + qx + pq. The middle coefficient is p + q and the constant is pq, so factoring a quadratic with a = 1 is exactly the search for two numbers with a known sum and a known product. Nothing about that is a trick — it is the multiplication table read in reverse.

When a is not 1, look at the cross terms instead. In (2x + 1)(x + 3), the cross terms are 6x and x: they add to 7x, which is b, and they multiply to 6x² — and 6 is a × c. That identity is general: the two cross terms of any factored quadratic always add to b and multiply to a × c. So splitting b into the two cross-term coefficients is not a classroom ritual; it is forced by the algebra, and the pair, when it exists with whole numbers, is unique.

Whether something “can be factored” depends on which numbers you are allowed to use. x² − 2 is prime over the integers and over the rationals, yet over the real numbers it splits as (x − √2)(x + √2). x² + 1 survives even the reals, then gives way over the complex numbers as (x − i)(x + i). “Prime” is always prime somewhere, and the somewhere matters.

The discriminant, b² − 4ac, is the instrument that reads the situation in advance. Positive and a perfect square: the roots are rational and the factorisation exists over the integers. Positive but not a square: the roots are real but irrational, and they arrive wearing a square root sign. Zero: one repeated root, a bracket squared. Negative: no real roots at all, and the answers are complex. This page reports the integer verdict first — because that is what “factor it” means in class — and then gives the roots in whichever number system they actually live in.

A note on scope: this page factors quadratics with whole-number coefficients and whole numbers up to 999,999,999,999, using exact integer arithmetic — there is no rounding anywhere in the factoring itself. Decimal roots, where shown, are rounded to four places and marked as approximations. For coursework, the steps shown are the point; for anything load-bearing, expand the answer back and check it lands on the original expression. CalcFolk is independent and is not affiliated with any school, examination board or publisher.

The AC method, worked slowly, and the GCF-first rule

The calculator shows its working for every quadratic, but the working is easier to trust when you have done one by hand. Take 2x² + 7x + 3, the example the calculator verifies above. First, multiply a × c: 2 × 3 = 6. Next, find two numbers that multiply to 6 and add to b, which is 7: 6 and 1. Split the middle term with them: 2x² + 6x + x + 3. Group the pairs: 2x(x + 3) + 1(x + 3). The common bracket appears in both groups, so factor it out: (2x + 1)(x + 3). Multiply back to check: 2x² + 6x + x + 3, which is the original. Every step is reversible, which is the point: factoring is multiplication run backwards, and the check is always just multiplying out again.

Before any of that, take out the greatest common factor, because skipping it is the most common reason a correct-looking answer is marked wrong. Factor 6x² + 9x + 3 without the GCF step and the AC method gives (2x + 1)(3x + 3), which multiplies out correctly but is not finished, because 3x + 3 still contains a factor of 3. With the GCF first: 6x² + 9x + 3 = 3(2x² + 3x + 1) = 3(2x + 1)(x + 1), and now every bracket is prime, nothing further factors. The rule is mechanical: if every coefficient shares a factor, take it out before anything else, and keep it in front of the answer. The calculator’s first working line does exactly this, reporting the GCF it removed or confirming that nothing is shared.

Two special patterns deserve instant recognition, because the AC method handles them but slowly. A difference of squares, x² − 25, factors as (x − 5)(x + 5): two squares with a minus between them, never a plus, because x² + 25 has no real factorisation and the AC search for it correctly finds nothing. A perfect-square trinomial, x² + 10x + 25, factors as (x + 5)²: the first and last terms are squares, and twice the product of their roots, 2 × x × 5 = 10x, is the middle term. Spotting these two patterns saves the AC search entirely, and mistaking a sum of squares for a difference is the one error in this section that produces an answer which looks plausible and multiplies out wrong, since (x + 5)(x − 5) is x² − 25, not x² + 25.

Factor trees: the same fingerprint, drawn as a tree

The integer calculator below the quadratic one gives the prime factorisation, the factor count and every factor pair, but a factor tree shows why the answer is unique, which a list alone does not. Start with 360 and split it into any two factors, say 36 × 10. Split each branch again: 36 becomes 6 × 6, 10 becomes 2 × 5. Split again: each 6 becomes 2 × 3. The leaves are 2, 2, 2, 3, 3 and 5, so 360 = 2³ × 3² × 5. Now start differently, with 360 = 18 × 20, and the tree still ends at the same leaves, because the fundamental theorem of arithmetic guarantees it: every whole number greater than 1 has exactly one prime factorisation, up to the order of the factors. The tree is a proof you can draw, not just a method.

StepWhat happensRunning product
Split 360360 = 36 × 1036 × 10
Split both branches36 = 6 × 6, 10 = 2 × 56 × 6 × 2 × 5
Split the sixes6 = 2 × 3, twice2 × 3 × 2 × 3 × 2 × 5
CollectThree 2s, two 3s, one 52³ × 3² × 5

The exponents then answer every counting question about the number. Add one to each exponent and multiply: (3 + 1)(2 + 1)(1 + 1) = 24 factors, which is why the calculator reports 24 factors for 360. Every factor is just those primes recombined within their exponents: 2² × 3 = 12 divides 360, 2⁴ does not, because the fingerprint contains only three 2s. The factor pairs the calculator lists, (1, 360) through (18, 20), are the same 24 factors arranged as complementary pairs, twelve of them, and the pairing is exact because 360 is not a perfect square: a square number has an odd factor count, with one factor paired with itself. Negative numbers factor the same way with a −1 in front: −360 is −1 × 2³ × 3² × 5, and the calculator handles the sign rather than pretending it is part of the primes.

Cubics: the rational-root search, by hand and in the panel

A cubic with integer coefficients can sometimes be factored by finding one rational root first, then dividing it out. The rational root theorem says any rational root p/q, in lowest terms, must have p dividing the constant term and q dividing the leading coefficient, so the candidates are a short, checkable list. For x³ − 6x² + 11x − 6, the constant term is −6, whose divisors are 1, 2, 3 and 6, and the leading coefficient is 1, so the candidates are ±1, ±2, ±3 and ±6. Testing x = 1 gives 1 − 6 + 11 − 6 = 0, so (x − 1) is a factor. Synthetic division, dividing by (x − 1), leaves x² − 5x + 6, which factors by the AC method into (x − 2)(x − 3). The full factorisation is (x − 1)(x − 2)(x − 3), and multiplying out returns the original cubic.

The Advanced options panel automates exactly this search, including non-monic cubics, where the leading coefficient adds denominator candidates. Enter 2x³ − 3x² − 11x + 6: the constant term 6 gives numerators ±1, ±2, ±3, ±6 and the leading coefficient 2 gives denominators 1 and 2, so the candidates include 3, and dividing by (x − 3) leaves 2x² + 3x − 2, which splits as (2x − 1)(x + 2). The panel reports (x − 3)(2x − 1)(x + 2). If no candidate makes the cubic zero, the panel says so plainly: such a cubic still has real roots, but they are irrational, and finding them needs the cubic formula or a numerical method, not a factor search. A panel that invented factors for those cases would be worse than useless, because the check, multiplying out, would fail.

One caution applies to all three modes on this page: factoring over the rationals is not the same as factoring over the reals. A quadratic with a negative discriminant, like x² + x + 1, has no real factors at all, and the calculator correctly reports that it does not factor rather than forcing an answer with complex numbers. A cubic always has at least one real root, but that root may be irrational, and then the rational factor search correctly stops after the first factor, or reports none. The honest answer in each case is the one that multiplies back, and the check step the calculator prints exists so you never have to take its word for it.

Sum and difference of cubes

Cubes factor like squares, with one extra term in the second bracket. The multiply-back check is what proves the extra term belongs there.

The difference of cubes is a cubed minus b cubed equals (a minus b) times (a squared plus ab plus b squared), and the sum of cubes is a cubed plus b cubed equals (a plus b) times (a squared minus ab plus b squared). The sign pattern is the whole lesson: the first bracket carries the sign of the original expression, and the middle term of the second bracket carries the opposite sign, so a difference of cubes has a plus in the middle and a sum of cubes has a minus. Worked, x cubed minus 27 is x cubed minus 3 cubed, so it factors as (x minus 3) times (x squared plus 3x plus 9), and multiplying back gives x cubed plus 3x squared plus 9x, minus 3x squared minus 9x minus 27, which collapses to x cubed minus 27, with every middle term cancelling. The sum version, x cubed plus 8, is (x plus 2) times (x squared minus 2x plus 4), and the same multiply-back collapses to x cubed plus 8.

Two cautions keep the pattern honest. First, the second bracket, the trinomial, does not factor further over the rationals in these examples, and trying to split it again is the commonest error after a correct cube factorisation: check it with the discriminant or by attempting the AC method, and leave it whole where it does not split. Second, the sum of squares does not factor over the real numbers at all, which the FAQ on this page already states for x squared plus 25, so a cube pattern must actually be cubes before it is used: x squared plus 8 is not a sum of cubes, and no cube identity applies to it. Where the expression is a cube plus or minus a cube, the identity above is the complete factorisation, and the multiply-back is the proof that the middle term has the right sign.

Counting factors from prime exponents

The prime factorisation does more than list the primes. Its exponents count the factors, without listing them.

Take 72, whose prime factorisation is 2 cubed times 3 squared. Every factor of 72 is built by choosing an exponent for 2 between 0 and 3 and an exponent for 3 between 0 and 2, which gives 4 choices for the first and 3 choices for the second, and 4 times 3 is 12 factors in total. The factors are 1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, and 72, in six pairs that each multiply to 72: 1 with 72, 2 with 36, 3 with 24, 4 with 18, 6 with 12, and 8 with 9. The rule generalises exactly: add 1 to each prime exponent and multiply the results, so a prime, with exponent 1, has (1 plus 1) equals 2 factors, itself and 1, and a number whose prime factorisation is p to the power a times q to the power b times r to the power c has (a plus 1)(b plus 1)(c plus 1) factors.

The pairing has one more consequence worth knowing: a number has an odd count of factors exactly when it is a perfect square, because every factor pairs with a different partner except the square root, which pairs with itself. 72 is not a square, so its count, 12, is even, with no factor left unpaired; 36, which is 2 squared times 3 squared, has (2 plus 1)(2 plus 1) equals 9 factors, an odd count, with 6 unpaired in the middle. The factor panel on this page lists every factor and every pair, so the exponent rule can be checked against it directly, and the check runs both ways: a panel count that disagrees with the exponent rule means a factor was missed, and the missing factor is found by running the exponent choices again, systematically, from 0 upward.

Frequently asked questions

What does a factoring calculator do?

It takes a quadratic — the a, b and c of ax² + bx + c — and rewrites it as a product of simpler factors, showing every step: the greatest common factor, the pair of numbers that splits the middle term, and the grouping that produces the two brackets. It also does the same job for whole numbers, breaking them into prime factors and listing every factor and factor pair. If a quadratic cannot be factored with whole numbers, it says so and gives the exact roots instead.

How do you factor a quadratic step by step?

First take out any factor shared by all three terms. Then multiply a by c and look for two numbers that multiply to that product and add to b. Split the middle term using that pair, group the four terms in twos, and pull the common bracket out — what remains is the factored form. For x² + 5x + 6: a × c is 6, the pair is 2 and 3, the split is x² + 3x + 2x + 6, the grouping is x(x + 3) + 2(x + 3), and the answer is (x + 2)(x + 3). Finally, expand your answer back — if you do not land on the original quadratic, something went wrong.

What does it mean if a quadratic cannot be factored?

It means no pair of whole numbers multiplies to a × c and adds to b, so no factorisation with whole-number coefficients exists — the quadratic is called prime over the integers. It still has roots; they are just not whole or fractional numbers. Depending on the discriminant, the roots are irrational (like −2 ± √3 for x² + 4x + 1) or complex (like −1 ± 2i for x² + 2x + 5). This calculator reports the prime verdict and then gives those roots exactly.

How do you find the prime factorisation of a number?

Keep dividing by the smallest prime that fits. For 360: divide by 2 three times (360, 180, 90, 45), by 3 twice (45, 15, 5), and by 5 once, which leaves 1 — so 360 = 2³ × 3² × 5. Every whole number has exactly one prime factorisation, a fact called the fundamental theorem of arithmetic, and everything else about the number’s factors is built from it.

How many factors does a number have?

Add one to every exponent in its prime factorisation and multiply those numbers together. For 360 = 2³ × 3² × 5, that is (3 + 1)(2 + 1)(1 + 1) = 4 × 3 × 2 = 24 factors. The reason it works: a factor of 360 is built by choosing how many 2s (none, one, two or three — four choices), how many 3s (three choices) and how many 5s (two choices), and every combination gives a different factor.

Can it factor quadratics with negative numbers?

Yes. Negative coefficients are handled throughout: a difference of squares like x² − 4 factors as (x − 2)(x + 2), and a negative middle or constant term just means the pair of numbers carries signs with it. If the leading coefficient a is negative, the calculator takes −1 out first so the x² term is positive — the same tidy-up you would do on paper — and says so in the steps.

Should I always take out the greatest common factor first?

Yes. If every coefficient shares a factor, remove it before any other step and keep it in front of the answer. Factoring 6x² + 9x + 3 without this step gives (2x + 1)(3x + 3), which is correct but unfinished, because 3x + 3 still contains a factor of 3. The finished answer is 3(2x + 1)(x + 1).

Does x² + 25 factor like x² − 25?

No. A difference of squares, x² − 25, factors as (x − 5)(x + 5), but a sum of squares has no real factorisation: no two real numbers multiply to +25 and add to 0. The calculator correctly reports that x² + 25 does not factor over the reals. Over the complex numbers it would be (x + 5i)(x − 5i), which is a different question from the one this page answers.

Why does every factor tree for one number end at the same primes?

Because of the fundamental theorem of arithmetic: every whole number greater than 1 has exactly one prime factorisation, up to order. Splitting 360 as 36 × 10 or as 18 × 20 leads to the same leaves, 2³ × 3² × 5, because the primes are the number’s fingerprint, and every divisor is just those primes recombined within their exponents.

What if a cubic has no rational root?

Then it does not factor over the rationals, and the Advanced panel says so rather than inventing factors. The cubic still has at least one real root, but it is irrational, and finding it needs the cubic formula or a numerical method. The same honesty applies to quadratics with a negative discriminant: no real factors exist, and the calculator reports that instead of forcing an answer.

How do you factor x cubed minus 27?

As a difference of cubes: x cubed minus 3 cubed equals (x minus 3) times (x squared plus 3x plus 9). The first bracket carries the minus sign, and the middle term of the trinomial carries a plus. Multiplying back gives x cubed minus 27, with all middle terms cancelling, and the trinomial does not factor further over the rationals.

How many factors does 72 have?

12. Its prime factorisation is 2 cubed times 3 squared, so the count is (3 plus 1) times (2 plus 1), which is 12. The factors are 1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, and 72, in six pairs that each multiply to 72.

What is factoring by grouping?

Factoring a four-term expression by grouping pairs that share a common factor, then factoring out the common binomial. For x cubed plus 3x squared plus 2x plus 6, group as x squared times (x plus 3) plus 2 times (x plus 3), then factor out (x plus 3) to give (x plus 3) times (x squared plus 2). The shared binomial is the proof the grouping worked.