50% off Plus--d--h--m

Prime Factorization Calculator

Type a whole number to see it written as a product of primes with exponents, whether it is prime, the repeated division, a factor tree, and every factor with how many there are. It answers at once, even for 18-digit numbers.

  • No account needed
  • Free, no limits
  • Nothing is uploaded

How it works

  1. 01

    Type a whole number

    Anything from 2 up to 18 digits, such as 360, 97 or 123456789.

  2. 02

    Read the primes

    The factorization appears in exponent form (360 = 2³ × 3² × 5), with a plain answer to whether the number is prime.

  3. 03

    Follow the working

    The repeated division, a factor tree, and the list of all factors with the count worked out from the exponents.

Down to the primes

Every whole number, built from primes

A prime number has exactly two factors, 1 and itself: 2, 3, 5, 7, 11… Every whole number greater than 1 is either prime or a product of primes in exactly one way, apart from their order; this is the fundamental theorem of arithmetic. Prime factorization finds that product. For 360: 360 ÷ 2 = 180, 180 ÷ 2 = 90, 90 ÷ 2 = 45, 45 ÷ 3 = 15, 15 ÷ 3 = 5, 5 ÷ 5 = 1, so 360 = 2³ × 3² × 5.

The factor tree shows the same idea as branches: split the number into any two factors, then split each factor that is not prime, until only primes are left at the ends. 360 can start as 18 × 20 or as 2 × 180; either way the primes at the bottom are the same. The repeated division (the ladder method) always divides by the smallest prime that works, which is the easiest to check by hand.

From the exponents you can count every factor without listing them: add 1 to each exponent and multiply. 360 = 2³ × 3² × 5¹ has (3 + 1) × (2 + 1) × (1 + 1) = 24 factors, all listed under the tree. Two mistakes to avoid: 1 is not a prime number (it has only one factor), and 2 is the only even prime. A number is prime when no prime up to its square root divides it.

The calculator takes whole numbers up to 18 digits. It divides by small primes first, then uses a primality test (Miller–Rabin, with bases that are proven exact for numbers this size) and Pollard's rho method for large factors, with a time limit so the page never freezes; if a part could not be split in time, it says so instead of guessing. 0 and 1 have no prime factorization, and decimals and negative numbers get a message. Everything runs in your browser and nothing is uploaded.

FAQ

Questions, answered

Maths revision that sticks

PocketNote turns your maths notes into flashcards and practice questions you can study anywhere.