Factor Calculator
A factor calculator is an arithmetic utility designed to find all whole-number divisors of a given integer. It lists all positive and negative factor pairs, computes the prime factorization (the representation of the number as a product of prime numbers), and identifies the greatest common factor (GCF) when two numbers are provided. Students, programmers, and educators use this tool to simplify fractions, solve algebraic factoring problems, and analyze number divisibility in algebra and pre-algebra.
Pick a mode, enter a whole number (and a second number for GCF), and the calculator returns every positive factor, the factor pairs, the prime factorization, or the greatest common factor, with a short plain English explanation.
Quick Answer
Find all factors, factor pairs, prime factorization, and the greatest common factor (GCF) of any integer. Enter a number to analyze its divisors.
Mode
The number to factor. Whole numbers only. · e.g. 60
Positive factors
12
Factors of 60
60 has 12 positive factors.
Examples
Factors of 60
1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60
Prime factorization of 60
2^2 × 3 × 5
Factor pairs of 12
1 × 12, 2 × 6, 3 × 4
gcf(48, 60)
= 12
How it works
A factor of a whole number n is any whole number that divides n evenly, with no remainder. The calculator covers four common factor questions in one place.
All factors
For each i from 1 to √n: if n mod i = 0, then i and n / i are factors.
Prime factorization
Divide by primes 2, 3, 5, 7, ... until 1 is left.
Greatest common factor (Euclidean)
gcf(a, b) = gcf(b, a mod b), stopping when the remainder is 0.
All four modes work on whole numbers. The calculator handles 0, 1, and negative inputs as special cases with short explanations rather than confusing or empty answers.
Learn the concept
These guides explain the idea this tool computes, with worked examples and the distinctions readers most often trip over.
What is a factor calculator?
A factor calculator finds every positive whole number that divides the input evenly. It can list all factors, group them into factor pairs that multiply to the input, return the prime factorization, or compute the greatest common factor of two numbers. Each mode handles the same question from a slightly different angle.
How the factor calculator works
Pick a mode and enter a whole number:
- Factors of a number: loops from 1 up to √n and collects every divisor in both directions.
- Factor pairs: the same loop, but returns pairs (i, n/i) instead of a flat list.
- Prime factorization: trial division by 2, 3, 5, 7, 11, ... until the remaining value reaches 1.
- Greatest common factor: the Euclidean algorithm, with each remainder step shown for clarity.
Inputs are capped at one billion in absolute value to keep the calculator responsive. For everyday math class problems that range is more than enough.
Finding all factors of a number
The fastest hand method is to check divisors in pairs. Start from 1 and go up; for every divisor i you find, the quotient n / i is also a factor. Stop when you reach √n, because any factor beyond that point will already have been paired with one you already wrote down.
Example: factors of 36. Check 1, 2, 3, 4, 5, 6. Hits at 1, 2, 3, 4, 6, paired with 36, 18, 12, 9, 6. Combine and sort: 1, 2, 3, 4, 6, 9, 12, 18, 36 (the 6 pairs with itself).
Prime factorization
Prime factorization writes a whole number as a product of prime numbers. By the fundamental theorem of arithmetic, every integer greater than 1 has a unique prime factorization, ignoring the order. The calculator divides by the smallest prime as many times as possible, then moves on to the next prime, and continues until the remaining value is 1.
Example: prime factorization of 60. 60 / 2 = 30; 30 / 2 = 15; 15 / 3 = 5; 5 / 5 = 1. The list is 2, 2, 3, 5, grouped as 2^2 × 3 × 5.
For a prime input, the prime factorization is just the number itself. The calculator flags this case.
Factor pairs
Factor pairs are pairs of whole numbers that multiply to the input. They are useful for finding rectangle dimensions with a given area, for building factor trees, and for factoring quadratic expressions. The calculator lists every positive pair from smallest first factor to largest.
Example: factor pairs of 24. 1 × 24, 2 × 12, 3 × 8, 4 × 6. Four pairs, eight factors total.
Greatest common factor
The greatest common factor (GCF) of two whole numbers is the largest whole number that divides both. It is also called the greatest common divisor (GCD). The Euclidean algorithm finds the GCF quickly: divide the larger by the smaller, take the remainder, and repeat with the divisor and the remainder until the remainder is 0. The last nonzero remainder is the GCF.
Example: gcf(48, 60). 60 = 1 × 48 + 12, 48 = 4 × 12 + 0. The remainder is 0, so the GCF is 12. The calculator prints each step in the side panel so you can follow along.
Another way to find the GCF is to list the factors of both numbers and pick the largest one that appears in both lists. The Euclidean approach is faster and produces the same result.
Special cases
- 0: every nonzero integer divides 0, so 0 has infinitely many factors. The calculator shows a message rather than an empty list.
- 1: the only positive factor is 1 itself; 1 has no prime factorization (it is neither prime nor composite).
- Prime numbers: the only positive factors are 1 and the number itself; the prime factorization is the number alone.
- Negative inputs: factors are computed on the absolute value. Every positive factor f of |n| also has a negative counterpart -f, so a negative input has twice as many integer factors as the positive count.
- gcf(0, 0): undefined, since every integer divides 0 and there is no greatest one.
Worked examples
- Factors of 60: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60 (12 factors).
- Factor pairs of 60: 1 × 60, 2 × 30, 3 × 20, 4 × 15, 5 × 12, 6 × 10 (6 pairs).
- Prime factorization of 60: 2^2 × 3 × 5.
- gcf(48, 60): 12.
- Factors of 17: 1, 17 (17 is prime).
- Prime factorization of 360: 2^3 × 3^2 × 5.
Common mistakes
- Forgetting that 1 and the number itself are always factors of any positive integer.
- Stopping the divisor loop too early. Every factor up to √n has a partner above it; both belong in the full factor list.
- Calling 1 prime. By the standard convention, 1 is neither prime nor composite.
- Confusing the greatest common factor with the least common multiple. The GCF divides both numbers; the LCM is divisible by both.
- Ignoring negative counterparts when the integer factors of a negative input are needed.
Where factors show up
Factors are foundational across math. They show up in fraction simplification (divide top and bottom by the GCF), in factoring polynomials, in finding rectangle dimensions with a given area, in modular arithmetic and cryptography, and in any problem that asks how a whole quantity can be split evenly. They also underpin powers and roots: a prime factorization is the cleanest way to spot whether a number is a perfect square, a perfect cube, or some other perfect power.
For related operations, see the square root calculator for the simplified radical form (which depends on the prime factorization), and the exponent calculator for raising values to powers.
Related tools
- GCF calculator for the greatest common factor of two or more numbers (focused exact-match tool).
- LCM calculator for the least common multiple, the partner concept to GCF.
- Scientific calculator for a full button-driven calculator with logs, exponents, roots, and trig in one place.
- Square root calculator with simplified radical form.
- Exponent calculator for raising a base to a power.
- Quadratic formula calculator for solving ax² + bx + c = 0.
- Factoring calculator for the algebraic counterpart that factors polynomials in one variable.
- Percentage calculator for the three standard percent questions.
- All education calculators.
Sources
- Wolfram MathWorld, Composite Number — “A composite number n is a positive integer n>1 which is not prime (i.e., which has factors other than 1 and itself).” This is the definition used on this page, and it is why 4 = 2 × 2 counts as composite despite having a single distinct prime factor.
- Wolfram MathWorld, Fundamental Theorem of Arithmetic — every positive integer except 1 can be represented in exactly one way, apart from rearrangement, as a product of one or more primes. This is what makes the prime factorization unique.
- Wolfram MathWorld, Euclidean Algorithm — the repeated division-with-remainder procedure the GCF mode shows step by step.
- OpenStax, Prealgebra 2e — Prime Factorization — introductory treatment: prime numbers have only two factors, composite numbers have more than two, and the prime factorization of a number is the product of primes equal to it.
Note. Inputs are capped at one billion in absolute value to keep results responsive. Special cases (0, 1, primes, negative inputs, and gcf with zero) are flagged in the result panel with a short explanation rather than empty or NaN output.
Related Calculators
More tools from Education



