PERSONAL FINANCE · 206 TOOLS · 0 SIGN-UP
TallyBench / Factor Calculator
// FACTORS & PRIMES

Every factor of a number, and its prime fingerprint.

All divisors in order, the prime factorisation, the factor count and their sum.

All factors—
How many—
Prime factorisation—
Prime or composite?—
Sum of factors—

Why factoring matters beyond this page

Two whole numbers' greatest common factor and least common multiple both fall straight out of their prime factorisations — compare the exponents and take the lower or higher of each. The LCM Calculator handles that comparison directly; this page is the tool that produces the factorisation to compare in the first place. The same building blocks are also what exponent notation compresses — 60 = 2² × 3 × 5 is exactly the kind of expression the Exponent Calculator works with in the other direction.

Why the input is capped at one trillion

This page finds factors by trial division, checking every candidate up to √n — for n = 60 that is only 7 checks, and even at the tool's one-trillion cap it is around a million checks, still instant for a browser. Cryptographic systems like RSA lean on the same method failing at a much larger scale: the numbers involved are typically 600-plus digits long, and even the fastest known factoring algorithms would take vastly longer than the age of the universe to break one apart, while multiplying the two source primes together in the first place takes a computer a fraction of a second. That one-way gap — trivial to multiply, computationally infeasible to un-multiply — is the basis of the encryption protecting most of the web.

Perfect squares and perfect cubes read off the same way

A number is a perfect square exactly when every exponent in its prime factorisation is even — 36 = 2² × 3² has two even exponents, so its square root is a whole number. It is a perfect cube when every exponent is divisible by 3 instead. The Root Calculator extracts that root directly once the relevant factorisation is known.

Factors come in pairs

Every factor has a partner that multiplies with it to give the original number. For 60: 1×60, 2×30, 3×20, 4×15, 5×12, 6×10. That pairing is why you only need to test up to the square root — beyond it you are just meeting partners you have already found from the other side. It is what makes this fast even for large inputs.

The one exception is a perfect square, where the middle factor is its own partner. 36 has 6×6, which is why perfect squares are the only numbers with an odd count of factors.

The prime factorisation is unique

60 = 2² × 3 × 5, and there is no other way to write it as a product of primes. That is the fundamental theorem of arithmetic: every whole number above 1 has exactly one prime factorisation, ignoring order. It is the reason primes are called the building blocks of arithmetic.

A useful consequence: the number of factors can be read straight off the factorisation. Add one to each exponent and multiply. For 60 = 2²×3¹×5¹ that is 3 × 2 × 2 = 12 factors, which matches the list without counting it.

One and zero are special cases

1 is neither prime nor composite. It has only one factor — itself — and excluding it from the primes is what keeps prime factorisation unique, since otherwise you could pad any factorisation with as many 1s as you liked. 0 is divisible by everything and is excluded here entirely.

Why do I only need to check up to the square root?

Because factors pair up. If a number divides n, so does n divided by it, and one of that pair is always at or below the square root. Testing beyond it just rediscovers partners you already have.

Why is 1 not a prime number?

Because prime factorisation would stop being unique. If 1 counted as prime you could write 6 as 2×3, or 1×2×3, or 1×1×2×3, endlessly. Excluding 1 keeps every number to exactly one factorisation.

How can I count the factors without listing them?

Take the prime factorisation, add one to each exponent, and multiply the results. 60 = 2²×3×5 gives (2+1)(1+1)(1+1) = 12, which is exactly how many factors it has.

Which numbers have an odd number of factors?

Only perfect squares. Factors normally pair off, giving an even count — but in a perfect square one factor is its own partner, breaking the pairing. 36 has 9 factors; 35 has 4.

Factoring stays fast because trial division only needs to check up to the square root — but multiplication itself has no such limit, and gets unwieldy for ordinary calculators long before factoring does. The Big Number Calculator handles that side exactly, computing products and factorials of any size without losing a single digit.

For factors shared between numbers, use the GCF Calculator and the LCM Calculator. Very large numbers are better handled by the Big Number Calculator, and for general arithmetic see the Scientific Calculator.