How to Use the Prime Factorization, GCD & LCM Calculator
-
1
Enter an integer to view its complete Prime Factorization decomposition.
-
2
Optionally enter a second integer to compute Greatest Common Divisor (GCD / GCF) and Least Common Multiple (LCM).
-
3
Click "Factor & Compute".
-
4
Inspect the exponential prime factorization format (e.g. 2³ × 3² × 5), prime test status, and common divisor steps.
Practical Example & Use Case
Factoring 360 produces 2³ × 3² × 5. Finding GCD and LCM of 360 and 240 yields GCD = 120 and LCM = 720.
Technical Notes & Limitations
Supports safe integers up to Number.MAX_SAFE_INTEGER (9,007,199,254,740,991) using trial division and prime optimization.
Frequently Asked Questions
What is the relationship between GCD and LCM?
For any two positive integers a and b, the product of their GCD and LCM equals the product of the numbers: GCD(a, b) × LCM(a, b) = a × b.