Calculators & Converters

Prime Factorization Calculator

Break a positive integer into its prime factors, group repeated factors as powers, and see how many positive divisors the number has. The result preserves the exact integer values throughout the calculation.

Free online tool

Loading tool…

2 through 1,000,000,000,000

Repeated prime factors are grouped by exponent. The divisor count includes 1 and the input itself.

Calculations run locally in your browser. This tool does not upload the numbers you enter.

GET STARTED

How to use the Prime Factorization Calculator

  1. 01

    Enter an integer from 2 through 1,000,000,000,000 using digits only.

  2. 02

    Calculate to see the prime-power product, exponent list, and divisor count.

  3. 03

    Use Copy result or Download text to save the factorization with its original input.

Examples

Repeated prime factors

360 = 2^3 × 3^2 × 5. Its positive divisor count is (3 + 1)(2 + 1)(1 + 1) = 24.

A square of a prime

169 = 13^2. Its three positive divisors are 1, 13, and 169.

What the exponents mean

In the prime-power product, the exponent counts how often the prime appears. For example, 2^3 stands for 2 × 2 × 2. A prime whose exponent is 1 appears once and is written without a power in the product.

Counting divisors without listing them

If the factorization is p^a × q^b, a positive divisor can contain any power of p from 0 through a and any power of q from 0 through b. Multiplying the number of choices for each prime gives the divisor count. This count includes both 1 and the original number.

How factors are found

The calculator divides out every factor of 2 and 3, then tests candidates on either side of multiples of 6. Each time it finds a factor, it removes all copies. Any remaining value above 1 after the square-root stopping condition is itself prime.

What to know

  • Input is restricted to integers from 2 to one trillion; larger factorization jobs need a different algorithm.

Common questions

Why is 1 not supported?

One has an empty prime factorization. This tool requires at least 2 so every successful result contains a prime factor.

What happens for a prime input?

The product contains only that prime with exponent 1. Its positive divisor count is 2.

Are these factors exact?

Yes. Parsing, division, and remainder checks use BigInt integers. No approximate numerical root finding is involved.

Can it factor negative numbers?

Use the absolute value here. The sign −1 is a unit rather than a prime factor and is outside this tool’s positive-input model.

Sources & references