TTKTheTextKit

Prime Factorization Calculator

Type a whole number and get its prime factorization at once, written with exponents, such as 360 = 2^3 x 3^2 x 5. The tool also tells you whether the number is prime, shows the division steps, lists every divisor and gives the number of divisors, their sum and Euler's totient. It handles numbers up to 18 digits, large semiprimes included. Everything runs in your browser.

360 is a composite number.

Prime factorization
2^3 x 3^2 x 5
Expanded
2 x 2 x 2 x 3 x 3 x 5
Number of divisors
24
Sum of divisors
1170
Euler totient
96
How many numbers from 1 to n share no factor with n

Division steps

  1. 360 / 2 = 180
  2. 180 / 2 = 90
  3. 90 / 2 = 45
  4. 45 / 3 = 15
  5. 15 / 3 = 5
  6. 5 / 5 = 1

All 24 divisors

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360

Related Tools

[4 suggestions]

About the Prime Factorization Calculator

The prime factorization calculator divides out small primes first, then uses the Miller-Rabin test and Pollard's rho method for large cofactors, all with exact BigInt arithmetic, so numbers up to 18 digits are factored exactly and quickly. The Miller-Rabin test uses a fixed set of bases that is proven correct for every number this tool accepts, so a prime is never a guess. Every whole number from 2 up has exactly one prime factorization, apart from the order of the factors, and the tool lists the factors from smallest to largest. The number 1 is neither prime nor composite and has no prime factors. From the exponents the tool also works out the number of divisors, their sum and the totient, and it lists all the divisors when there are 1,000 or fewer. A number such as 28 or 496, whose divisors add up to twice the number, is marked as perfect. Input is read strictly: digits only, with commas allowed only as thousands separators, and decimals, signs and exponents are reported instead of guessed. The results were compared with SymPy on 4,522 numbers of every length, including semiprimes of two 9-digit primes, prime squares, Carmichael numbers and the largest 18-digit primes, with no differences. Everything runs in your browser and nothing is uploaded.

What is prime factorization?▾

It is writing a number as a product of prime numbers. For example, 360 = 2 x 2 x 2 x 3 x 3 x 5, or 2^3 x 3^2 x 5. Every whole number from 2 up has exactly one such product, apart from the order of the factors.

Is 1 a prime number?▾

No. A prime has exactly two divisors, 1 and itself, and 1 has only one divisor. Excluding 1 is what makes the factorization of every other number unique. The tool reports 1 as neither prime nor composite.

How do I know if a number is prime?▾

Type it in. The tool says whether it is prime or composite and, for a composite number, shows the factors. By hand you only need to test the primes up to the square root of the number.

How large a number can I factor?▾

Up to 18 digits, which is just under one quintillion. Larger numbers are rejected so the answer stays exact and the page stays fast.

Is my data uploaded?▾

No. The factoring runs in your browser, and what you type is not sent anywhere or stored.