Number Theory • Core Pillar

Prime Factorization Calculator

The definitive number theory calculator for breaking down any integer into its unique prime factors, generating canonical exponential forms, division ladder proofs, complete divisor lists, and GCF/LCM linkages.

|
Last Updated: September 2026
|
Fundamental Theorem of Arithmetic Verification

Target Integer

N ≥ 2
Quick Presets:
Visualization View:

Canonical Prime Decomposition

Composite Number
Exponential Prime Form
2² × 3 × 5
2 × 2 × 3 × 5
Total Divisors 12 factors
Sum of Divisors σ(N) 168
Distinct Primes 5

Visual Factor Tree

Prime Leaf Composite
All Divisors of N:

1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60

Direct Answer & Overview
Verified Educational Guide

How to Find the Prime Factorization of a Number

Prime factorization is the unique expression of a composite number as a product of prime factors. To factorize an integer N, divide it by the smallest prime number (2, 3, 5, 7, ...) that divides it evenly, note the prime divisor, and repeat the process on the resulting quotient until the quotient reaches 1.

Primary Mathematical Formula Standard Mathematical Model
Standard Equation
ƒ(x)
Q.E.D.
N = p₁ᵃ¹ · p₂ᵃ² · p₃ᵃ³ ... pₖᵃᵏ (where pᵢ are prime numbers and aᵢ ≥ 1)
Evaluated with exact mathematical formulation • Rigorously verified
Exact Formula
Input Parameters
Required
1
Target Integer (N): Any whole number greater than 1 (e.g. 120, 2520, 1024)
Expected Outputs
Calculated
Canonical Exponential Form: Compact prime power representation (e.g. 2³ × 3 × 5)
Expanded Multiplicative Product: 2 × 2 × 2 × 3 × 5
Total Divisors Count τ(N) and Complete Factor List
Step-by-Step Division Ladder Sequence
Worked Numerical Example
Instant Verification
Find the prime factorization of 120
→ 120 ÷ 2 = 60; 60 ÷ 2 = 30; 30 ÷ 2 = 15; 15 ÷ 3 = 5; 5 ÷ 5 = 1. Prime factors: 2, 2, 2, 3, 5
2³ × 3 × 5

The Fundamental Theorem of Arithmetic & Prime Numbers

In mathematics, prime numbers are the fundamental building blocks of all integers—often described as the "chemical elements" of arithmetic. The Fundamental Theorem of Arithmetic (Unique Factorization Theorem) states:

Theorem Definition

Every integer n > 1 is either a prime number itself or can be factored uniquely as a product of prime powers, up to the arrangement order of the factors.

Prime Numbers
Exactly 2 Divisors (1 and itself)

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71...

Composite Numbers
More than 2 Divisors

4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30...

Methods: Trial Division, Factor Trees & Ladders

Three complementary algorithms allow manual and programmatic factorization of any integer:

1. Trial Division Method

Test divisibility starting with the smallest prime p = 2. If n mod p == 0, record p and divide n by p. If not, advance to the next prime. Stop when p² > n.

2. Factor Tree Visual Method

Split the original number into any two factor branches (e.g. 120 = 12 × 10). Continue splitting composite child branches (12 = 4 × 3, 4 = 2 × 2; 10 = 2 × 5) until all terminal leaves are primes.

3. Division Ladder Method

Repeatedly divide vertically by prime divisors on the left side of a ladder bar, writing quotients below, until reaching a final quotient of 1.

Canonical Prime Power Exponential Form

Rather than listing repeated prime factors linearly (2 × 2 × 2 × 3 × 5), standard mathematical literature condenses identical factors into exponential prime powers:

N = p₁a₁ × p₂a₂ × p₃a₃ × ... × pₖaₖ

Where p₁ < p₂ < ... < pₖ are distinct prime numbers in strictly ascending order and each exponent aᵢ ≥ 1.

Deriving Total Divisors τ(N) & Divisor Sum σ(N)

A major advantage of canonical prime factorization is the ability to determine all arithmetic divisor properties instantaneously without trial division:

Divisor Count Function τ(N)
τ(N) = (a₁ + 1)(a₂ + 1)...(aₖ + 1)

For 120 = 2³ × 3¹ × 5¹: Total factors = (3+1)(1+1)(1+1) = 16 divisors.

Sum of Divisors Function σ(N)
σ(N) = ∏ (pᵢaᵢ+1 − 1) / (pᵢ − 1)

For 120: σ(120) = (15/1) × (8/2) × (24/4) = 15 × 4 × 6 = 360.

Real-World Applications & RSA Cryptography

Prime factorization powers the security infrastructure of global digital civilization:

RSA Public-Key Encryption

SSL/TLS web encryption relies on public keys generated from the product of two massive primes (N = p × q). Factoring N is the only way to break the private key.

Gear Ratios & Periodic Scheduling

Engineers use co-prime gear tooth counts (e.g. 17 and 31 teeth) to ensure even mechanical wear across all teeth surfaces over time.

Fraction Simplification & GCD

Reducing complex fractions to lowest terms requires identifying and canceling shared prime factors between the numerator and denominator.

Acoustics & Musical Harmonics

Harmonic intervals (octaves 2:1, perfect fifths 3:2, perfect fourths 4:3) are exact prime frequency ratios that create consonant auditory waveforms.

Step-by-Step Worked Examples

Example 1: Factoring 360 Intermediate

Find the prime factorization and total divisor count of 360.

1. Divide by 2: 360 ÷ 2 = 180 (Factor: 2)

2. Divide by 2: 180 ÷ 2 = 90 (Factor: 2)

3. Divide by 2: 90 ÷ 2 = 45 (Factor: 2)

4. Divide by 3: 45 ÷ 3 = 15 (Factor: 3)

5. Divide by 3: 15 ÷ 3 = 5 (Factor: 3)

6. Divide by 5: 5 ÷ 5 = 1 (Factor: 5)

7. Canonical Form: 360 = 2³ × 3² × 5¹.

8. Total Divisors: τ(360) = (3+1)(2+1)(1+1) = 4 × 3 × 2 = 24 divisors.

Common Calculation Pitfalls & Edge Cases

Including 1 as a Prime Factor

Writing 1 × 2 × 3 is invalid. 1 is neither prime nor composite and must never appear in prime factorizations.

Stopping with Composite Leaves

Leaving an answer as 4 × 3 × 5 is incomplete because 4 is composite (2²). Every factor must be strictly prime.

Skipping Primality Checks

Assuming a large odd number (like 91) is prime without testing divisors up to √N (91 = 7 × 13).

Fact-Checked & Verified • Computational Accuracy Standards
Updated July 2026 • Editorial Policy
Authored By
Sanjay Samanta

Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.

Reviewed & Verified By
Academic Review Board

Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.

Found an error or have an improvement suggestion? Report a calculation issue

Frequently Asked Questions

What is prime factorization and what is the Fundamental Theorem of Arithmetic?
Prime factorization is the process of decomposing a composite number into a unique product of prime numbers. The Fundamental Theorem of Arithmetic states that every integer greater than 1 is either a prime number itself or can be represented uniquely as a product of prime powers, up to the order of the factors (e.g., 120 = 2³ × 3 × 5).
How do you find the prime factors of a number using a factor tree?
To build a factor tree, find any two factors that multiply to give the original number (e.g., for 60, choose 6 × 10). If a branch is a prime number (like 2, 3, 5), circle it as a terminal leaf. If a branch is composite, continue breaking it down (6 = 2 × 3; 10 = 2 × 5) until all terminal branches are prime numbers. Collect all circled prime leaves: 60 = 2 × 2 × 3 × 5 = 2² × 3 × 5.
How do you calculate the total number of divisors from prime factorization?
Express the number in its canonical prime factorization form: N = p₁ᵃ¹ × p₂ᵃ² × ... × pₖᵃᵏ. The total number of positive divisors τ(N) is found by adding 1 to each prime exponent and multiplying the results: τ(N) = (a₁ + 1)(a₂ + 1)...(aₖ + 1). For example, for 120 = 2³ × 3¹ × 5¹, total divisors = (3 + 1)(1 + 1)(1 + 1) = 4 × 2 × 2 = 16 divisors.
How is prime factorization used in modern cryptography (RSA)?
Public-key cryptography (such as RSA) relies on the fact that while multiplying two massive 1024-bit prime numbers together is computationally instantaneous, factoring their 2048-bit product back into the original primes is practically impossible with classical computers, securing global internet banking, SSL/TLS, and encrypted communications.
Why is 1 not considered a prime number?
By definition, a prime number is an integer greater than 1 that has exactly two distinct positive divisors: 1 and itself. If 1 were classified as a prime number, the Fundamental Theorem of Arithmetic would fail because prime factorizations would lose their uniqueness (e.g., 6 = 2 × 3 = 1 × 2 × 3 = 1² × 2 × 3).
How do you find the Greatest Common Factor (GCF) and Least Common Multiple (LCM) using prime factorization?
To find the GCF of two numbers, multiply the lowest common powers of all shared prime factors: GCF(a, b) = ∏ pᵢ^min(aᵢ, bᵢ). To find the LCM, multiply the highest powers of all prime factors present in either number: LCM(a, b) = ∏ pᵢ^max(aᵢ, bᵢ).

Connected Number Theory Tools

Ecosystem Hub