Skip to content

Math

Prime Factorization

Enter your values and the result updates as you type. The formula and a worked example are below the calculator.

A whole number from 1 to 18 digits. Digit grouping such as 1,00,000 is fine.

Prime factors of 1,260

2² × 3² × 5 × 7

6 prime factors counting repeats, 4 different.

Prime factorization

1,260 = 2 × 2 × 3 × 3 × 5 × 7

= 2² × 3² × 5 × 7

Prime factors
2, 2, 3, 3, 5, 7
Different primes
4
Prime factors with repeats
6
Number of factors (divisors)
36

Factor tree

1,26063031510535722335
Filled circles are prime numbers.

Division method

Divide by the smallest prime that goes in, write down what is left, and repeat until you reach 1. The primes on the left are the prime factors.

Repeated division of 1,260 by primes
21,260
2630
3315
3105
535
77
Left over1

How to use

  1. Enter a whole number from 1 to 18 digits. Pasted digit grouping such as 1,00,000 works.
  2. Read its prime factors, the product written with exponents, and how many factors it has.
  3. Open the factor tree and the repeated division to see how the primes are found.

Formula

Every whole number above 1 is a prime or a product of primes in exactly one way apart from order (the fundamental theorem of arithmetic). The primes are found by dividing by the smallest prime that goes in, repeating until the quotient is 1.

Example

100 = 2 x 2 x 5 x 5 = 2 squared x 5 squared. The tree splits 100 into 50 and 2, 50 into 25 and 2, then 25 into 5 and 5. In the same way 1260 = 2 x 2 x 3 x 3 x 5 x 7 = 2 squared x 3 squared x 5 x 7.

A prime has no factorization other than itself, and 1 has none at all. Numbers up to 18 digits are factored exactly, with an exact primality test and Pollard's rho method for large factors, so even long numbers come back at once. Very large numbers with two big prime factors, as used in encryption, are far out of range of any calculator.