Skip to content
UniKit

Integer factorization

Prime factorization (trial division + Pollard’s rho) with divisor count and sum, Euler φ, largest prime factor, neighbouring primes and every step.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Integer to factor

Factorization

84 = 2^2 × 3 × 7
2^237
Is primeNo
Decimal digits2
Divisor count τ(n)12
Divisor sum σ(n)224
Euler φ(n)24
Smallest prime factor2
Largest prime factor7
Next prime89
Previous prime83

Factorization steps

84 ÷ 2 = 42Composite
42 ÷ 2 = 21Composite
21 ÷ 3 = 7prime, factoring stops

What this tool does

  • Factor a large integer for a number-theory or competitive-programming problem: type 600851475143 and get 71 × 839 × 1471 × 6857 without trial division by hand.
  • Reduce fractions, simplify radicals or find a common denominator by first looking at the prime factors and their exponents.
  • Check whether a modulus or public-key parameter in a crypto or hash exercise is actually prime, and see what divides it.
  • Prepare RSA demos, random seeds or hash bucket counts using the divisor count τ(n), divisor sum σ(n) and Euler φ(n).

Example

Input

600851475143

Output

600851475143 = 71 × 839 × 1471 × 6857

Divisor count τ = 16, divisor sum σ = 610544148480, Euler φ = 591194251200. The steps are ÷71 → 8462696833, ÷839 → 10086647, ÷1471 → 6857, and 6857 is prime.

Frequently asked questions

How large a number can it factor?

Up to 24 decimal digits; anything longer is rejected as too large. The algorithm is trial division plus Pollard’s rho, so a 24-digit semiprime (a product of two large primes) usually still finishes within seconds, but the runtime grows unpredictably with the number of digits.

What happens with 0, 1 or a negative number?

You get "enter an integer greater than 1". Neither 0 nor 1 has a prime factorization and negatives need a sign convention, so all three are refused. Decimals, scientific notation such as 1e10 and other bases such as 0xFF are rejected too — decimal integers only.

How does it decide whether a number is prime?

With a Miller-Rabin primality test whose bases are deterministic for integers below 64 bits, so there are no false positives in practice. If the input itself is prime, the result contains only that number, the step list is empty and the tool says it is already prime.

How are σ(n) and φ(n) computed?

The prime factors are first written as p^e, then the formulas are applied: τ(n) = ∏(e+1), σ(n) = ∏(p^(e+1)−1)/(p−1) and φ(n) = ∏p^(e−1)(p−1). For 12 = 2² × 3 that gives τ = 3 × 2 = 6, σ = 7 × 4 = 28 and φ = 2 × 2 = 4.

Is the factorization sent anywhere?

No. Everything is computed in your browser with BigInt, no network request is made and it works offline. The number you enter is never stored or logged.

Keywords:factorizationprime factorprimedivisoreuler phipollard rho质因数分解质数约数欧拉函数

Related tools