GCD & LCM Calculator
Find greatest common divisor and least common multiple with prime factorization.
GCD
12
LCM
72
Prime Factorizations
| 24 | 2^3 × 3 |
| 36 | 2^2 × 3^2 |
Use the GCD & LCM Calculator above to calculate your results. Enter your values and see instant results — all calculations run in your browser.
Disclaimer: This calculator is for informational purposes only and does not constitute tax, financial, or legal advice. Results are estimates based on the information you provide and current rates. Always consult a qualified tax professional or financial advisor for advice specific to your situation.
How It Works
Our GCD & LCM Calculator efficiently determines the greatest common divisor and least common multiple of two or more integers using prime factorization. This is crucial for optimizing resource allocation in large-scale projects, such as scheduling 2026's 3,500 planned satellite launches to minimize orbital congestion or synchronizing 2026's 18,000 global financial transactions to prevent system bottlenecks.
The calculator first finds the prime factorization of each input number. For the GCD, it multiplies the common prime factors raised to the lowest power they appear in any factorization. For the LCM, it multiplies all unique prime factors raised to the highest power they appear in any factorization.
Ensure all inputs are positive integers; the concepts of GCD and LCM are typically applied to non-zero natural numbers. A common mistake is to confuse the 'lowest' power for GCD with 'highest', and vice-versa for LCM, leading to incorrect results, especially with numbers containing many shared prime factors.
Example: Optimizing Delivery Routes for 2026
- 1 A logistics company in 2026 needs to synchronize delivery routes. One route takes 12 days to complete, another takes 18 days, and a third takes 30 days. We want to find when all three routes will align for maintenance (LCM) and the largest common interval for intermediate checks (GCD).
- 2 Prime factorization: 12 = 2^2 * 3; 18 = 2 * 3^2; 30 = 2 * 3 * 5. For GCD, common primes with lowest powers: 2^1 * 3^1. For LCM, all unique primes with highest powers: 2^2 * 3^2 * 5^1.
- 3 GCD = 2 * 3 = 6. LCM = 4 * 9 * 5 = 180.
- 4 The greatest common divisor (GCD) is 6 days, meaning the largest common interval for intermediate checks across all routes is every 6 days. The least common multiple (LCM) is 180 days, indicating that all three routes will align for major maintenance every 180 days, allowing for efficient resource planning across the company's 2026 operations.
Source: Khan Academy · Last updated: April 2026
Frequently Asked Questions
How do you find the GCD of two numbers?
How do you find the LCM of two numbers?
What is GCD used for in real life?
You might also need
Percentage Calculator
Calculate percentages three ways: what is X% of Y, X is what % of Y, and percentage change from X to Y.
Fraction Calculator
Add, subtract, multiply, and divide fractions. Results shown as fraction, mixed number, and decimal.
Standard Deviation Calculator
Calculate mean, variance, and standard deviation (population and sample) from a data set.