How the Factor Calculator works
A factor (or divisor) of a whole number n is any whole number a such that n ÷ a comes out even, with no remainder — equivalently, n = a × b for some whole number b. This calculator takes a positive integer and finds every one of its factors, breaks it down into its prime factorization, and reports how many factors it has and what they add up to.
The trial-division method, step by step
- Test each whole number i starting at 1 and going up to √n.
- If n ÷ i has no remainder, then i is a factor — and so is its pair, n ÷ i, because i × (n ÷ i) = n.
- Collect every pair found, remove any duplicate when n is a perfect square (√n pairs with itself), and sort the results.
- Only checking up to √n is enough: if a factor were larger than √n, its paired factor would have to be smaller than √n, so it would already have been found.
Prime factorization
- Building blocks: the prime factorization writes n as a product of primes, e.g. 60 = 2² × 3 × 5. Every integer greater than 1 has exactly one such factorization (the Fundamental Theorem of Arithmetic), regardless of the order primes are found in.
- Finding it: divide n by the smallest possible prime (2, then 3, then 5, …) repeatedly, moving to the next prime whenever the current one no longer divides evenly, until what remains is 1.
- Counting factors from primes: if n = p₁^e₁ × p₂^e₂ × …, the total number of factors equals (e₁+1) × (e₂+1) × … — for 60 = 2² × 3¹ × 5¹, that's 3 × 2 × 2 = 12 factors.
Common uses
Factoring is the basis for simplifying fractions, finding the greatest common factor (GCF) or least common multiple (LCM) of two numbers, reducing radicals, and factoring polynomials in algebra. It also shows up directly in cryptography, scheduling problems (finding numbers that divide evenly into a time period), and puzzle or number-theory work where knowing exactly how a number can be split apart matters.