Prime Factorization

Break a whole number down into its prime factors. Trial division is shown one step at a time, and the result is written as a product of prime powers.
Computed
The prime factorization and the full working are shown below.
Prime factorizationexact
840=23⋅3⋅5⋅7840 = 2^{3} \cdot 3 \cdot 5 \cdot 7
Prime factorsexact
23315171

Step-by-step solution

  1. 1

    Start

    Factorize 840 by trial division: test candidate divisors in increasing order (2, 3, 5, 7, 11, …) and divide whenever one fits, until the remainder itself is prime.

  2. 2

    Divide by 2 (3 times)

    840 is divisible by 2 more than once: 840 ÷ 2 = 420, 420 ÷ 2 = 210, 210 ÷ 2 = 105. The prime 2 appears 3 times.

    840=2⋅420=22⋅210=23⋅105840 = 2 \cdot 420 = 2^{2} \cdot 210 = 2^{3} \cdot 105
  3. 3

    Divide by 3

    105 is divisible by 3: 105 ÷ 3 = 35.

    105=3⋅35105 = 3 \cdot 35
  4. 4

    Divide by 5

    35 is divisible by 5: 35 ÷ 5 = 7.

    35=5⋅735 = 5 \cdot 7
  5. 5

    Divide by 7

    Every candidate divisor up to √7 has been tested, so the remaining number 7 is itself prime — the last factor: 7 ÷ 7 = 1.

    7=7⋅17 = 7 \cdot 1
  6. 6

    Prime factorization

    Collect all the prime factors found along the way: 840 = 2^3 · 3 · 5 · 7.

    840=23⋅3⋅5⋅7840 = 2^{3} \cdot 3 \cdot 5 \cdot 7