Factoring Calculator (Polynomial & Number)

Prime factorization, divisors, GCD/LCM, and quadratic factoring with discriminant and roots.

MATH

Two-in-one factoring tool. Switch between Number mode (prime factorization, divisor list, GCD, LCM of two integers) and Quadratic mode (factor ax²+bx+c into a(x−r₁)(x−r₂) using the discriminant b²−4ac).

Number mode does trial division by primes up to √n, then enumerates every divisor and computes GCD via the Euclidean algorithm with LCM = a·b/gcd. Quadratic mode evaluates the discriminant D = b²−4ac: D > 0 gives two distinct real roots and the factored form a(x−r₁)(x−r₂); D = 0 gives a repeated root and a(x−r)²; D < 0 reports complex conjugate roots and notes the polynomial is irreducible over the reals. Worked example: 60 = 2² × 3 × 5, divisors {1,2,3,4,5,6,10,12,15,20,30,60}, GCD(60,24)=12, LCM=120. Quadratic x²−5x+6 has discriminant 1, roots 2 and 3, factored (x−2)(x−3).

Disclaimer: Handles standard ax²+bx+c with real coefficients and positive-integer factoring. For higher-degree polynomials or symbolic factoring use a CAS such as Wolfram Alpha or SymPy.
Loading calculator…
Advertisement

Frequently Asked Questions

What is prime factorization?
Writing an integer as a product of prime numbers. By the Fundamental Theorem of Arithmetic this representation is unique up to order — e.g. 60 = 2 × 2 × 3 × 5 = 2² × 3 × 5.
How do I factor a quadratic?
Compute the discriminant D = b²−4ac, then the roots r = (−b ± √D)/(2a). If D ≥ 0 the factored form is a(x−r₁)(x−r₂); if D = 0 it collapses to a(x−r)².
What is the discriminant?
The expression b²−4ac under the square root in the quadratic formula. Its sign tells you the nature of the roots: positive = two distinct real roots, zero = one repeated root, negative = complex conjugate roots.
What's the difference between GCD and LCM?
GCD (greatest common divisor) is the largest integer dividing both numbers; LCM (least common multiple) is the smallest positive integer they both divide. They satisfy GCD(a,b) × LCM(a,b) = a × b.
Why can't all quadratics be factored over rationals?
A quadratic with integer coefficients factors over the rationals only when its discriminant is a perfect square. Otherwise the roots are irrational (D > 0 but not a perfect square) or complex (D < 0).
Sponsored