GCD, LCM & Prime Factorization Calculator
HOTCompute Greatest Common Divisor (GCD), Least Common Multiple (LCM), prime factorizations, and full divisor lists for any numbers.
Responsive 728x90 / 320x100 Ad Slot
(CLS Prevention Active · Zero Shift)Global GCD & LCM
Euclidean Algorithm12
Largest integer that divides all inputs
360
Smallest positive integer multiple
Decomposition & Divisors per Number
2ⁿ (2^3) × 3
1, 2, 3, 4, 6, 8, 12, 24
2ⁿ (2^2) × 3ⁿ (3^2)
1, 2, 3, 4, 6, 9, 12, 18, 36
2ⁿ (2^2) × 3 × 5
1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60
Native In-Feed / High Viewability Ad Slot
(CLS Prevention Active · Zero Shift)Number Theory Foundations: Greatest Common Divisor, LCM & Prime Decomposition
The Greatest Common Divisor (GCD), Least Common Multiple (LCM), and Prime Factorization represent foundational keystones of mathematical number theory, dating back to Book VII of Euclid's Elements (circa 300 BCE). According to the Fundamental Theorem of Arithmetic, every integer strictly greater than 1 admits a completely unique factorization into prime numbers up to order of factors. In this sense, prime numbers serve as the indivisible 'elementary atoms' composing the infinite integer universe.
Identifying common divisors and multiples governs countless practical optimization challenges across STEM disciplines. From reducing rational fractions to lowest terms and sizing maximum modular square paving tiles without material scrap, to computing the cyclical synchronization period of interlocking industrial gears or asynchronous network task loops, GCD and LCM provide rigorous solutions. For any two positive integers $a$ and $b$, the harmonic identity $a \times b = \text{GCD}(a, b) \times \text{LCM}(a, b)$ stands as one of the most elegant symmetries in elementary mathematics.
Euclid's algorithm remains celebrated as one of the oldest and most computationally efficient algorithms in existence, operating in logarithmic time complexity ($O(\log(\min(a, b)))$) by repeatedly taking remainders rather than attempting costly trial divisions. The OrvoKit GCD, LCM & Prime Factorization Calculator accepts two or more integers simultaneously, generating prime exponential decompositions, full positive divisor lists, total divisor tallies, and divisor sums in real time.
The Euclidean Algorithm & Fundamental Theorem of Arithmetic
Mathematical mechanics of division algorithms and prime exponent lattice intersections.
Dividing integer $a$ by $b$ yields remainder $r = a \pmod b$. The common divisors of $a$ and $b$ are identical to those of $b$ and $r$. In prime power forms, GCD extracts minimum exponents while LCM extracts maximum exponents across common primes.
👉 The greatest common divisor of 24 and 36 is 12, the least common multiple is 72, and the complete factors of 24 are [1, 2, 3, 4, 6, 8, 12, 24].
- Euclidean Modulo Recurrence: Successively taking quotients and remainders until the remainder reaches zero isolates the GCD in logarithmic steps.
- Fundamental Product Theorem: For any two positive integers, $a \times b = \text{GCD}(a, b) \times \text{LCM}(a, b)$ holds invariantly.
- Multi-Number Associativity: $\text{GCD}(a, b, c) = \text{GCD}(\text{GCD}(a, b), c)$ enables sequential resolution across arbitrary lists of integers.
- Divisor Enumeration: For canonical form $N = p_1^{a} p_2^{b}$, total divisor count equals $(a+1)(b+1)$, and the sum of divisors expands as $(1 + p_1 + \dots + p_1^{a})(1 + p_2 + \dots + p_2^{b})$.
Common Integer Pairs: Prime Decompositions, GCD, LCM & Coprimality Matrix
Standard reference matrix showcasing number theoretic properties across ubiquitous composite and prime combinations.
| Integer Pair (A, B) | Prime Form of A | Prime Form of B | Greatest Common Divisor (GCD) | Least Common Multiple (LCM) | Divisor Count of A | Coprimality Status |
|---|---|---|---|---|---|---|
| 12, 18 | 2² × 3¹ | 2¹ × 3² | 6 | 36 | 6 divisors | Not Coprime (Common 2, 3, 6) |
| 24, 36 | 2³ × 3¹ | 2² × 3² | 12 | 72 | 8 divisors | Not Coprime (Common 12) |
| 15, 28 | 3¹ × 5¹ | 2² × 7¹ | 1 | 420 | 4 divisors | Coprime (GCD = 1) |
| 45, 60 | 3² × 5¹ | 2² × 3¹ × 5¹ | 15 | 180 | 6 divisors | Not Coprime (Common 15) |
| 48, 72 | 2⁴ × 3¹ | 2³ × 3² | 24 | 144 | 10 divisors | Not Coprime (Common 24) |
| 16, 25 | 2⁴ | 5² | 1 | 400 | 5 divisors | Coprime (GCD = 1) |
| 54, 90 | 2¹ × 3³ | 2¹ × 3² × 5¹ | 18 | 270 | 8 divisors | Not Coprime (Common 18) |
| 70, 105 | 2¹ × 5¹ × 7¹ | 3¹ × 5¹ × 7¹ | 35 | 210 | 8 divisors | Not Coprime (Common 35) |
| 64, 96 | 2⁶ | 2⁵ × 3¹ | 32 | 192 | 7 divisors | Not Coprime (Common 32) |
| 84, 126 | 2² × 3¹ × 7¹ | 2¹ × 3² × 7¹ | 42 | 252 | 12 divisors | Not Coprime (Common 42) |
* Two integers sharing no common positive divisors other than 1 are strictly 'Coprime' (or relatively prime), where their LCM simply equals their direct product (A × B).
High-Engagement In-Article Native Ad Slot
(CLS Prevention Active · Zero Shift)How to Use
11. Enter Two or More Positive Integers
Provide positive integers separated by commas or spaces into the input field (e.g., 24, 36, 60 or 105, 140).
22. View Real-Time GCD & LCM Results
The engine executes the Euclidean algorithm alongside prime power exponent extraction to compute overall GCD and LCM immediately.
33. Inspect Exponential Prime Factorizations
Review each number's unique canonical prime factor decomposition ($p_1^{a} \times p_2^{b} \times \dots$) accompanied by interactive visual badges.
44. Examine Divisor Lists, Counts & Arithmetic Sums
Inspect the comprehensive list of positive factors, count of divisors, and their arithmetic sum, then copy with one click.
Real-World Engineering, Mechanical Synchronization & Architectural Scenarios
Practical problems solved by modular divisibility, tile layouts, and periodic scheduling.
Paving an entrance corridor measuring 180cm by 240cm with seamless whole square tiles: the largest tile dimension without scrap cutting is GCD(180, 240) = 60cm (requiring exactly 12 tiles).
If Bus Route A arrives every 12 minutes and Route B arrives every 18 minutes, departing together at 8:00 AM: their next simultaneous departure occurs at LCM(12, 18) = 36 minutes later, at 8:36 AM.
A driving gear with 24 teeth meshes with a driven gear with 36 teeth: the two gears return to their exact starting tooth engagement point after LCM(24, 36) = 72 tooth contacts (3 driver rotations, 2 driven rotations).
Summing 5/24 + 7/36: finding the least common denominator LCM(24, 36) = 72 converts fractions to (15 + 14)/72 = 29/72, avoiding unwieldy large product expansions.
💡 Mathematician Guidelines & Critical Arithmetic Traps
When calculating mentally, remember GCD(a, b) = GCD(a - b, b). For example, GCD(91, 52) = GCD(91 - 52, 52) = GCD(39, 52) = GCD(13, 39) = 13, avoiding long division.
To verify whether an integer N is prime, you never need to test divisors past √N. If no prime less than or equal to √N divides N evenly, N is guaranteed prime. For 101, testing primes ≤ √101 ≈ 10.04 (2, 3, 5, 7) takes seconds.
Any two consecutive positive integers share no common divisor greater than 1. Thus GCD(n, n+1) = 1, and their LCM is always simply n(n+1) (e.g., GCD(99, 100) = 1, LCM = 9900).
While LCM(a, b) = ab / GCD(a, b) holds for two numbers, LCM(a, b, c) does NOT equal abc / GCD(a, b, c). Always compute multiple values sequentially: LCM(LCM(a, b), c).
⚠️ Common Pitfalls & Mistakes to Avoid
Frequently Asked Questions (FAQ)
Expert answers to the most frequently asked questions and edge cases.
Because the Euclidean algorithm avoids decomposing numbers into prime factors altogether. Factoring large integers is an NP-hard class problem forming the basis of RSA cryptography. The Euclidean algorithm operates solely through rapid modulo remainder operations ($a \pmod b$), halving the magnitude of the problem at every other step to guarantee ultra-fast logarithmic convergence ($O(\log N)$) even for numbers with dozens of digits.
Wide Responsive Banner
(CLS Prevention Active · Zero Shift)Related Tools
Quadratic Formula & Linear System Equation Solver
Step-by-step quadratic equation solver with discriminant, complex roots, parabola vertex, and 2-variable linear systems.
Percentage Master Calculator
All-in-one percentage calculator: What is X% of Y, proportion ratios, percentage change, and retail discounts.
Number Radix Converter (Binary · Octal · Decimal · Hexadecimal)
Bidirectional radix converter with interactive bit-flipping grid and two's complement arithmetic.
Ohm's Law & Electric Power Calculator
Calculate Voltage, Current, Resistance, and Power instantly by providing any 2 known values.