CCalculate.Studio

🧩 Prime Factorization Calculator

Prime factorization expresses a whole number as a product of prime numbers, and by the fundamental theorem of arithmetic, every whole number greater than 1 has exactly one such factorization (ignoring the order of factors). This calculator finds the prime factorization of any whole number from 2 up to 1 trillion, along with the total count of divisors and the sum of all divisors.

Son inceleme: 2026-07-07

Understanding the prime factorization result

The table below shows the prime factorizations of several familiar numbers to illustrate how the exponent notation works.

NumberPrime factorizationNumber of divisors
122² × 36
1002² × 5²9
3602³ × 3² × 524
17 (a prime number)17 (itself, exponent 1)2
10242¹⁰11
  • A prime number's own factorization is simply itself with an exponent of 1, and it always has exactly 2 divisors: 1 and itself. This is precisely the defining property of a prime number.
  • The number 1 is neither prime nor composite and has no prime factorization (it is the empty product); this calculator requires input of 2 or greater.
  • For very large numbers, trial division becomes computationally slow because it must test candidate primes up to the square root of the number — this is why factoring extremely large numbers (hundreds of digits) is computationally hard and forms the security basis of RSA encryption.

What is prime factorization?

Prime factorization is the process of breaking a whole number down into the set of prime numbers that multiply together to produce it. A prime number is a whole number greater than 1 with exactly two positive divisors: 1 and itself (2, 3, 5, 7, 11, 13, ... are the first several primes). For example, 360 factors into 2³ × 3² × 5, meaning 360 = 2×2×2×3×3×5.

The fundamental theorem of arithmetic, one of the cornerstone results of number theory, guarantees that every whole number greater than 1 has one and only one prime factorization, up to the order in which the factors are written. This uniqueness is what makes prime factorization a well-defined, reliable operation rather than one of several equally valid answers.

Prime factorization underpins core areas of mathematics and computer science: it is used to find the greatest common factor and least common multiple of numbers, to determine all the divisors of a number, to simplify fractions and radicals, and — for very large numbers — its computational difficulty is the mathematical foundation of RSA public-key cryptography, which relies on the fact that factoring a large number is far harder than multiplying its factors together.

How to use this prime factorization calculator

  1. Enter a whole number of 2 or greater (up to 1 trillion).
  2. The calculator repeatedly divides by the smallest possible prime factor until only 1 remains, following the standard trial-division method.
  3. Read the prime factorization in exponent form (e.g. 2³ × 3² × 5), where each exponent shows how many times that prime appears in the product.
  4. Review the total number of positive divisors the number has, and the sum of all of those divisors — both derived directly from the prime factorization.

How prime factorization, divisor count and divisor sum are calculated

n = p₁^e₁ × p₂^e₂ × ... × pₖ^eₖ (unique prime factorization)
Number of divisors = (e₁+1)(e₂+1)...(eₖ+1)
Sum of divisors = ∏ (pᵢ^(eᵢ+1) − 1) ÷ (pᵢ − 1)
Example: 360 = 2³ × 3² × 5 → 24 divisors, sum of divisors = 1170

Trial division finds the prime factorization by testing successive candidate primes, starting at 2, dividing the number by each prime as many times as it evenly divides, then moving to the next candidate. Worked example: 360 ÷ 2 = 180, ÷2 = 90, ÷2 = 45 (no longer divisible by 2, so 2 appears 3 times); 45 ÷ 3 = 15, ÷3 = 5 (no longer divisible by 3, so 3 appears 2 times); 5 ÷ 5 = 1 (5 appears once). Result: 360 = 2³ × 3² × 5.

Once the prime factorization n = p₁^e₁ × p₂^e₂ × ... × pₖ^eₖ is known, the total number of positive divisors (including 1 and n itself) is found by adding 1 to each exponent and multiplying the results: (e₁+1) × (e₂+1) × ... × (eₖ+1). Worked example for 360 = 2³ × 3² × 5¹: (3+1) × (2+1) × (1+1) = 4 × 3 × 2 = 24 divisors.

The sum of all divisors is found using the multiplicative divisor-sum formula: for each prime power p^e in the factorization, its contribution is (p^(e+1) − 1) ÷ (p − 1) — the sum of a geometric series 1 + p + p² + ... + p^e — and these contributions are multiplied together across all prime factors. Worked example for 360: the 2³ term contributes (2⁴−1)/(2−1) = 15, the 3² term contributes (3³−1)/(3−1) = 13, and the 5¹ term contributes (5²−1)/(5−1) = 6; multiplying 15 × 13 × 6 = 1170, the sum of all 24 divisors of 360.

Common mistakes

  • Stopping the factorization early before reaching 1 — every factor found must be divided out completely (not just once) before moving to the next candidate prime.
  • Treating 1 as a prime number — by modern mathematical convention, 1 is neither prime nor composite, and including it in a factorization would violate the uniqueness guaranteed by the fundamental theorem of arithmetic.
  • Forgetting that the exponent (not just the base prime) matters for counting divisors — the number of divisors formula uses (exponent + 1) for each prime, not just the count of distinct primes.
  • Assuming every large number has small prime factors — many large numbers (especially products of two large primes) have no small factors at all, which is exactly the property that makes them useful for cryptographic applications.

Sıkça Sorulan Sorular

How do you find the prime factorization of a number?

Divide the number repeatedly by the smallest prime that divides it evenly, continuing with that same prime until it no longer divides evenly, then move to the next prime, and repeat until the remaining quotient is 1. For 360: divide by 2 three times (360→180→90→45), then by 3 twice (45→15→5), then by 5 once (5→1), giving 360 = 2³ × 3² × 5.

How many divisors does a number have?

Add 1 to each exponent in the prime factorization and multiply the results together. For 360 = 2³ × 3² × 5¹, the divisor count is (3+1) × (2+1) × (1+1) = 4 × 3 × 2 = 24. This counts all positive divisors, including 1 and the number itself.

What is the fundamental theorem of arithmetic?

The fundamental theorem of arithmetic states that every whole number greater than 1 can be written as a product of prime numbers in exactly one way, aside from the order in which the primes are listed. This uniqueness is what makes prime factorization a well-defined operation rather than one of multiple equally valid answers, and it underlies much of number theory.

Is 1 a prime number?

No. By modern mathematical convention, 1 is neither prime nor composite. A prime number is defined as having exactly two distinct positive divisors (1 and itself); the number 1 has only one positive divisor (itself), so it does not meet the definition. Excluding 1 from the primes is also necessary for the fundamental theorem of arithmetic to hold, since otherwise a number could be 'factored' with any number of extra factors of 1.

Why is prime factorization important for encryption?

Modern RSA public-key cryptography relies on the fact that multiplying two large prime numbers together is computationally easy, but factoring their large product back into the original primes is computationally very hard using currently known classical algorithms. This asymmetry — easy to multiply, hard to factor — allows a public key (the product) to be shared openly while the private key (the prime factors) remains secret and effectively unrecoverable within a practical time frame for sufficiently large primes.

How do you find the sum of all divisors of a number?

Using the prime factorization n = p₁^e₁ × p₂^e₂ × ..., compute (pᵢ^(eᵢ+1) − 1) ÷ (pᵢ − 1) for each prime factor and multiply the results. For 360 = 2³ × 3² × 5: the 2³ term gives (2⁴−1)/(2−1)=15, the 3² term gives (3³−1)/(3−1)=13, and the 5¹ term gives (5²−1)/(5−1)=6; multiplying 15×13×6 = 1170, the sum of all divisors of 360.

Kaynaklar

  1. Rosen KH. Elementary Number Theory and Its Applications. 6th ed. Pearson, 2010. (Fundamental theorem of arithmetic, divisor functions.)
  2. Hardy GH, Wright EM. An Introduction to the Theory of Numbers. 6th ed. Oxford University Press, 2008.
  3. Rivest RL, Shamir A, Adleman L. A Method for Obtaining Digital Signatures and Public-Key Cryptosystems. Communications of the ACM, 1978; 21(2): 120–126. (RSA and the factoring problem.)

Sayılar teorisi · Tüm Hesaplama Araçları

İlgili Hesaplama Araçları