Prime Factorization Calculator

Please provide an integer to find its prime factors as well as a factor tree.


RelatedFactor Calculator | Common Factor Calculator

What is a prime number?

Prime numbers are positive integers greater than 1 that cannot be expressed as a product of two smaller natural numbers. For instance, 7 is prime because its only divisors are 1 and 7. Other small primes are 2, 3, 5, 11 and so on.

Numbers that can be written as the product of two natural numbers exceeding 1 are called composite numbers. Typical examples are 4, 6, 9, etc.

In number theory the fundamental theorem of arithmetic tells us that every integer above 1 is either a prime itself or can be broken down into a multiplication of prime factors. Take 60, which can be expressed as 2 × 2 × 3 × 5.

60 = 5 × 3 × 2 × 2

As can be seen from the example above, there are no composite numbers in the factorization.

What is prime factorization?

Prime factorisation means splitting a composite integer into a set of prime numbers whose product equals the original number. Various algorithms exist for this task, ranging from simple to highly sophisticated.

Trial division:

A straightforward way to obtain the prime factors of a composite number is the trial‑division method. It repeatedly tests whether the number can be divided without remainder by successive integers, counting how many times each divisor fits. As an illustration, the factorisation of 820 by trial division is shown below.

820 ÷ 2 = 410

410 ÷ 2 = 205

After eliminating the factor 2, 205 is no longer even, so we move to the next candidates. It is not divisible by 3, and 4 is not prime, but 5 divides it exactly.

205 ÷ 5 = 41

Since 41 itself is prime, the trial‑division process stops here, giving the final decomposition as follows:

820 = 41 × 5 × 2 × 2

The products can also be written as:

820 = 41 × 5 × 22

This is essentially the "brute force" method for determining the prime factors of a number, and though 820 is a simple example, it can get far more tedious very quickly.

Prime decomposition:

Another popular technique for prime factorisation is called prime decomposition, often visualised with a factor tree. This approach repeatedly breaks a composite number into two factors until all resulting branches are prime. Using 820 as an example, a factor tree can be built in at least two distinct ways, each ultimately revealing the same set of prime factors.

         820
         /   \
      410  2
      /   \
   205  2
   /   \
41   5
           
      820
     /      \
  205     4
  /   \     /   \
41  5   2    2

Thus, it can be seen that the prime factorization of 820, in either case, again is:

820 = 41 × 5 × 2 × 2

While these methods work for smaller numbers (and there are many other algorithms), there is no known algorithm for much larger numbers, and it can take a long period of time for even machines to compute the prime factorizations of larger numbers; in 2009, scientists concluded a project using hundreds of machines to factor the 232-digit number, RSA-768, and it took two years.

Prime factorization of common numbers

The following are the prime factorizations of some common numbers.

Prime factorization of 2: prime number
Prime factorization of 3: prime number
Prime factorization of 4: 22
Prime factorization of 5: prime number
Prime factorization of 6: 2 × 3
Prime factorization of 7: prime number
Prime factorization of 8: 23
Prime factorization of 9: 32
Prime factorization of 10: 2 × 5
Prime factorization of 11: prime number
Prime factorization of 12: 22 × 3
Prime factorization of 13: prime number
Prime factorization of 14: 2 × 7
Prime factorization of 15: 3 × 5
Prime factorization of 16: 24
Prime factorization of 17: prime number
Prime factorization of 18: 2 × 32
Prime factorization of 19: prime number
Prime factorization of 20: 22 × 5
Prime factorization of 21: 3 × 7
Prime factorization of 22: 2 × 11
Prime factorization of 23: prime number
Prime factorization of 24: 23 × 3
Prime factorization of 25: 52
Prime factorization of 26: 2 × 13
Prime factorization of 27: 33
Prime factorization of 28: 22 × 7
Prime factorization of 29: prime number
Prime factorization of 30: 2 × 3 × 5
Prime factorization of 31: prime number
Prime factorization of 32: 25
Prime factorization of 33: 3 × 11
Prime factorization of 34: 2 × 17
Prime factorization of 35: 5 × 7
Prime factorization of 36: 22 × 32
Prime factorization of 37: prime number
Prime factorization of 38: 2 × 19
Prime factorization of 39: 3 × 13
Prime factorization of 40: 23 × 5
Prime factorization of 41: prime number
Prime factorization of 42: 2 × 3 × 7
Prime factorization of 43: prime number
Prime factorization of 44: 22 × 11
Prime factorization of 45: 32 × 5
Prime factorization of 46: 2 × 23
Prime factorization of 47: prime number
Prime factorization of 48: 24 × 3
Prime factorization of 49: 72
Prime factorization of 50: 2 × 52
Prime factorization of 51: 3 × 17
Prime factorization of 52: 22 × 13
Prime factorization of 53: prime number
Prime factorization of 54: 2 × 33
Prime factorization of 55: 5 × 11
Prime factorization of 56: 23 × 7
Prime factorization of 57: 3 × 19
Prime factorization of 58: 2 × 29
Prime factorization of 59: prime number
Prime factorization of 60: 22 × 3 × 5
Prime factorization of 61: prime number
Prime factorization of 62: 2 × 31
Prime factorization of 63: 32 × 7
Prime factorization of 64: 26
Prime factorization of 65: 5 × 13
Prime factorization of 66: 2 × 3 × 11
Prime factorization of 67: prime number
Prime factorization of 68: 22 × 17
Prime factorization of 69: 3 × 23
Prime factorization of 70: 2 × 5 × 7
Prime factorization of 71: prime number
Prime factorization of 72: 23 × 32
Prime factorization of 73: prime number
Prime factorization of 74: 2 × 37
Prime factorization of 75: 3 × 52
Prime factorization of 76: 22 × 19
Prime factorization of 77: 7 × 11
Prime factorization of 78: 2 × 3 × 13
Prime factorization of 79: prime number
Prime factorization of 80: 24 × 5
Prime factorization of 81: 34
Prime factorization of 82: 2 × 41
Prime factorization of 83: prime number
Prime factorization of 84: 22 × 3 × 7
Prime factorization of 85: 5 × 17
Prime factorization of 86: 2 × 43
Prime factorization of 87: 3 × 29
Prime factorization of 88: 23 × 11
Prime factorization of 89: prime number
Prime factorization of 90: 2 × 32 × 5
Prime factorization of 91: 7 × 13
Prime factorization of 92: 22 × 23
Prime factorization of 93: 3 × 31
Prime factorization of 94: 2 × 47
Prime factorization of 95: 5 × 19
Prime factorization of 96: 25 × 3
Prime factorization of 97: prime number
Prime factorization of 98: 2 × 72
Prime factorization of 99: 32 × 11
Prime factorization of 100: 22 × 52
Prime factorization of 101: prime number
Prime factorization of 102: 2 × 3 × 17
Prime factorization of 103: prime number
Prime factorization of 104: 23 × 13
Prime factorization of 105: 3 × 5 × 7
Prime factorization of 106: 2 × 53
Prime factorization of 107: prime number
Prime factorization of 108: 22 × 33
Prime factorization of 109: prime number
Prime factorization of 110: 2 × 5 × 11
Prime factorization of 111: 3 × 37
Prime factorization of 112: 24 × 7
Prime factorization of 113: prime number
Prime factorization of 114: 2 × 3 × 19
Prime factorization of 115: 5 × 23
Prime factorization of 116: 22 × 29
Prime factorization of 117: 32 × 13
Prime factorization of 118: 2 × 59
Prime factorization of 119: 7 × 17
Prime factorization of 120: 23 × 3 × 5
Prime factorization of 121: 112
Prime factorization of 122: 2 × 61
Prime factorization of 123: 3 × 41
Prime factorization of 124: 22 × 31
Prime factorization of 125: 53
Prime factorization of 126: 2 × 32 × 7
Prime factorization of 127: prime number
Prime factorization of 128: 27
Prime factorization of 129: 3 × 43
Prime factorization of 130: 2 × 5 × 13
Prime factorization of 131: prime number
Prime factorization of 132: 22 × 3 × 11
Prime factorization of 133: 7 × 19
Prime factorization of 134: 2 × 67
Prime factorization of 135: 33 × 5
Prime factorization of 136: 23 × 17
Prime factorization of 137: prime number
Prime factorization of 138: 2 × 3 × 23
Prime factorization of 139: prime number
Prime factorization of 140: 22 × 5 × 7
Prime factorization of 141: 3 × 47
Prime factorization of 142: 2 × 71
Prime factorization of 143: 11 × 13
Prime factorization of 144: 24 × 32
Prime factorization of 145: 5 × 29
Prime factorization of 146: 2 × 73
Prime factorization of 147: 3 × 72
Prime factorization of 148: 22 × 37
Prime factorization of 149: prime number
Prime factorization of 150: 2 × 3 × 52

Prime factorization of 200: 23 × 52
Prime factorization of 300: 22 × 3 × 52
Prime factorization of 400: 24 × 52
Prime factorization of 500: 22 × 53
Prime factorization of 600: 23 × 3 × 52
Prime factorization of 700: 22 × 52 × 7
Prime factorization of 800: 25 × 52
Prime factorization of 900: 22 × 32 × 52
Prime factorization of 1000: 23 × 53
Financial Fitness & Health Math Other