GCF and LCM Calculator
Find the greatest common factor (GCF/HCF) and least common multiple (LCM) of two or more numbers using prime factorization, with every factor tree and comparison shown.
Try an example:
How the GCF and LCM Calculator works
- Break each number into prime factors (24 = 2³ × 3, 36 = 2² × 3²).
- GCF: multiply the primes they share, each to its lowest power (2² × 3 = 12).
- LCM: multiply every prime to its highest power (2³ × 3² = 72).
Frequently asked questions
What is the difference between GCF and LCM?
The GCF is the largest number that divides all the numbers. The LCM is the smallest number that all of them divide into.
Is there a shortcut linking GCF and LCM?
For two numbers, GCF × LCM equals the product of the numbers, so LCM = (a × b) ÷ GCF.
More Arithmetic & Number Sense calculators
Fraction CalculatorAdd, subtract, multiply, divide and simplify fractions and mixed numbers.
Percentage CalculatorPercent-of, percent change, increase, decrease and reverse percentages.
Ratio & Proportion CalculatorSimplify ratios, solve proportions and share amounts in a ratio.
Prime FactorizationBreak any number into primes and test divisibility.
Exponents & RootsPowers, square roots, cube roots, radicals and scientific notation.
Order of Operations (BODMAS)Evaluate expressions in the correct order, one operation at a time.
MathMate can make mistakes. Please double-check important steps and calculations.