Back to home

Factor Calculator

Find all factors, factor pairs, prime factorization, and number of divisors for any positive integer up to 10,000,000.

Find Factors
Enter a positive integer (up to 10,000,000)

About Factors and Divisors

A factor (or divisor) of an integer n is any integer that divides n exactly with no remainder. For example, the factors of 12 are 1, 2, 3, 4, 6, and 12. Factors always come in pairs — for every factor f of n, n/f is also a factor. Pairs are typically listed from smallest to largest: (1, n), (2, n/2), and so on.

The most efficient algorithm for finding all factors is trial division up to √n. For each integer i from 1 to √n, if i divides n, then both i and n/i are factors. This runs in O(√n) time. A number is prime if its only factors are 1 and itself — in other words, it has exactly two distinct factors. All other integers greater than 1 are composite.

The number of divisors function τ(n) counts how many factors n has. If the prime factorization of n is p₁^e₁ × p₂^e₂ × … × pₖ^eₖ, then τ(n) = (e₁ + 1)(e₂ + 1) … (eₖ + 1). For example, 360 = 2³ × 3² × 5¹, so τ(360) = (3+1)(2+1)(1+1) = 24 divisors.

Related Calculators

Explore more free online calculators to help with your calculations

Take this calculation further

Browse the math calculators collection for more tools in this subject.

For a related calculation, use Prime Factorization Calculator to break any integer into its prime factors. Shows exponential form, factor tree, and number of divisors. Alternatively, use Percentage Calculator to calculate percentages, percent change, and percentage of a number quickly and easily.

For the underlying method, read How Currency Conversion Works: Rates, Spreads, and Smarter Estimates or Percentage Calculations Made Clear: Change, Discounts, and Reverse Percentages.