Life Calculator
MAKE THE FORMULA CLEAR

Prime factorization calculator

Break one positive whole number into prime factors, see repeated factors as powers, and follow every exact division step.

Start with your own numbers

Editable example

An example is filled in. Replace it with your own data to calculate.

Enter one positive whole number, such as 840, without an expression or thousands separators. Calculate to see the division steps.

For example, enter 840 without commas or an equals sign. Use a whole number from 1 to 1000000000000.

Results update when inputs are complete. A plan is kept only when you save it. Inputs and results are not uploaded.

Saved plans →

Saved in this browser. Before changing devices, export a backup from My tools.

Example result

Prime factorization

2^3 × 3^2

A power means repeated multiplication: 2^3 is 2 × 2 × 2, not 2 × 3. A prime has exactly two positive divisors, 1 and itself. One is neither prime nor composite.

Expanded product2 × 2 × 2 × 3 × 3
Distinct prime factors2
Number typeComposite

Worked steps

  1. 72 ÷ 2 = 36
  2. 36 ÷ 2 = 18
  3. 18 ÷ 2 = 9
  4. 9 ÷ 3 = 3
  5. 3 ÷ 3 = 1

Use whole numbers from 1 to 1000000000000 without thousands separators. One is neither prime nor composite and has no prime factors. Every factor shown is prime; 2^3 means 2 × 2 × 2. Repeated exact divisions produce factors whose product equals the input. This is not polynomial factorization or a cryptography tool.

Method and scope

Repeatedly divide out each prime factor, checking possible divisors only up to the square root of the remaining number. The factors multiply back to the original integer.

Use whole numbers from 1 to 1000000000000. One is neither prime nor composite and has no prime factors. Powers mean repeated multiplication, not multiplication by the exponent.

This is exact bounded integer factorization, not polynomial factorization, arbitrary-length integer processing or a cryptography tool.

References:OpenStax: primes, composite numbers and prime factorization

What this helps you do

Break a single positive whole number into prime factors for a school exercise or an arithmetic check. This is different from finding the greatest common divisor of two numbers; only one input is needed.

What to enter

Enter a whole number from 1 to 1000000000000 without commas, units, an equals sign or an expression. The example 72 is editable. Zero, negative values and fractions are outside this tool; one receives its own explanation.

How the calculation works

Remove every factor of 2, then test successive odd divisors up to the square root of the remaining value. Any remainder greater than one is the last prime factor. Each exact division reduces the remaining integer, and all extracted factors multiply back to the original.

Worked example

For 840, the successive quotients are 420, 210, 105, 35, 7 and 1 after division by 2, 2, 2, 3, 5 and 7. Thus 840 = 2^3 × 3 × 5 × 7. For 97 the factorization contains just 97, so the input is prime.

Understanding the answer

The power 2^3 means 2 × 2 × 2, which is 8, rather than 2 × 3. The expanded product shows every repeated factor. The distinct-factor count counts different prime values; it is not the number of all positive divisors of your input.

Scope and limitations

One is neither prime nor composite and has no prime factorization in this sense. The input bound keeps division and multiplication within exact safe-integer arithmetic. This tool does not handle polynomial expressions, arbitrary-length integers or cryptographic key analysis. Use the separate GCD and LCM tool for two-number comparisons.

Keep it handy for next time

Add Prime factorization calculator to your home screen

This icon opens this tool. Confirm installation in your browser.

  1. iPhone: Open in Safari, tap Share → Add to Home Screen, then confirm.
  2. Android: Open in Chrome and choose Install app or Add to Home screen from the menu.
  3. In an in-app browser such as LINE or Facebook, use its menu to open the page in Safari or Chrome first.

Browser options vary. A shortcut does not provide cross-device synchronization, and an installed app may have separate storage. Export a backup from My tools first. The first load requires a connection.

Checking offline data.