Last verified · v1.0
Calculator · math
Prime Factorization Calculator
Decompose any positive integer into its prime factors instantly. Displays factored form, expanded factor list, and exponent notation.
Inputs
Prime Factorization Result
—
Explain my result
Get a plain-English breakdown of your result with practical next steps.
The formula
How the
result is
computed.
What Is Prime Factorization?
Prime factorization is the process of decomposing any positive integer greater than 1 into a unique product of prime numbers. A prime number is any integer greater than 1 with no positive divisors other than 1 and itself — familiar examples include 2, 3, 5, 7, 11, and 13. The Fundamental Theorem of Arithmetic guarantees that every integer n > 1 has exactly one such representation up to the order of factors, making prime factorization a cornerstone of number theory, cryptography, and computational mathematics.
The Prime Factorization Formula
Every positive integer n > 1 can be expressed as:
n = p1a1 × p2a2 × … × pkak
Where:
- p1 < p2 < … < pk are distinct prime numbers listed in strictly ascending order
- a1, a2, …, ak are positive integer exponents representing the multiplicity of each prime in the factorization
- n is the original positive integer being decomposed
As a concrete illustration, 360 = 23 × 32 × 51, because 8 × 9 × 5 = 360. Here k = 3, with p1 = 2 carrying exponent 3, p2 = 3 carrying exponent 2, and p3 = 5 carrying exponent 1.
How to Find Prime Factors: Trial Division
The trial division algorithm is the most transparent method for computing prime factorizations:
- Begin with the smallest prime, 2. Divide n by 2 repeatedly until the quotient is no longer evenly divisible; the number of successful divisions is the exponent of 2.
- Advance to the next prime (3) and repeat the same repeated-division process.
- Continue through successive primes. Only primes p ≤ √n need testing, because any prime factor exceeding √n would force n itself to be prime.
- If a remainder greater than 1 remains after testing all primes up to √n, that remainder is itself a prime factor with exponent 1.
Worked example — factorizing 180: Divide by 2 twice (22), leaving 45. Divide 45 by 3 twice (32), leaving 5. Since 5 is prime, the final result is 180 = 22 × 32 × 5.
Key Variables Explained
Number to Factorize
Enter any positive integer greater than 1. Prime inputs such as 97 return a single factor (971). Highly composite numbers such as 720,720 yield many factors: 24 × 32 × 5 × 7 × 11 × 13. A useful derived quantity is the total divisor count: (a1+1)(a2+1)…(ak+1). For 360, this equals (3+1)(2+1)(1+1) = 24 total positive divisors.
Output Type
Three output modes are available: standard factored form presents the compact exponential product (e.g., 23 × 32 × 5); expanded factor list shows each prime repeated according to its multiplicity (e.g., 2, 2, 2, 3, 3, 5); and exponent notation presents the formula variables explicitly. GCF and LCM calculations benefit most from the expanded list, while cryptographic and algebraic applications favor exponent notation.
Real-World Applications
- Greatest Common Factor (GCF): Multiply shared prime factors at their lowest exponents across both numbers. For GCF(48, 180): 48 = 24 × 3 and 180 = 22 × 32 × 5, so GCF = 22 × 3 = 12.
- Least Common Multiple (LCM): Multiply all prime factors at their highest exponents. LCM(48, 180) = 24 × 32 × 5 = 720.
- Fraction Simplification: Dividing numerator and denominator by their GCF, derived from their prime factorizations, reduces any fraction to lowest terms in a single step.
- RSA Cryptography: RSA encryption security depends on the computational infeasibility of factoring the product of two large primes. A standard 2048-bit RSA key is the product of two primes each roughly 617 digits long — beyond the reach of any current factorization algorithm.
- Euler's Totient Function: The function φ(n), central to modular arithmetic and public-key cryptography, is computed directly and efficiently from the prime factorization of n using the formula φ(n) = n × ∏(1 − 1/pi).
Methodology and Sources
The trial division algorithm implemented here follows the theoretical framework established in Topics in Number Theory (ScholarWorks@GVSU), which provides a rigorous proof of the Fundamental Theorem of Arithmetic and its computational consequences. Practical verification methodology and symbolic computation examples are drawn from the SDSU Sage as a Calculator Tutorial by Michael O'Sullivan, which demonstrates integer factorization using the Sage mathematical software system. Together these authoritative academic sources ground the calculator in both proven theory and validated implementation practice.
Reference