How to use GCF and LCM Calculator
The GCF and LCM calculator finds the greatest common factor and least common multiple of two or more whole numbers at once, and shows the prime factorization of each value so you can see how the results are built. Enter a list of numbers separated by commas or spaces and get the GCF (also called HCF), the LCM, and a factor breakdown — useful for simplifying fractions, finding common denominators, and scheduling problems.
- Enter two or more whole numbers, separated by commas or spaces.
- Press Calculate to compute the GCF and LCM.
- Read the GCF and LCM cards and each number’s prime factorization.
- Copy the summary to reuse the result elsewhere.
Your data never leaves your device — 100% private processing.
How the GCF and LCM are calculated
The greatest common factor is found with the Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing it by the smaller until one becomes zero — the other is the GCF. For a list, the calculator folds this pairwise: GCF(a, b, c) = GCF(GCF(a, b), c). The least common multiple is derived from the GCF using LCM(a, b) = (a × b) ÷ GCF(a, b), again applied pairwise. This is exact and fast even for large numbers, unlike listing out every factor by hand.
| Step | Value |
|---|---|
| Prime factors of 12 | 2 × 2 × 3 |
| Prime factors of 18 | 2 × 3 × 3 |
| Shared factors (GCF) | 2 × 3 = 6 |
| LCM = 12 × 18 ÷ 6 | 36 |
Where GCF and LCM show up
The GCF is the key to reducing fractions: 18/24 divides top and bottom by their GCF of 6 to give 3/4. The LCM is what you need for a least common denominator when adding fractions, and for timing problems — if one bus comes every 12 minutes and another every 18, the LCM of 36 tells you they arrive together every 36 minutes. Both ideas also appear in music (rhythmic cycles), engineering (gear ratios), and computer science (buffer and stride sizing), which makes a quick GCF/LCM tool broadly useful.
Worked examples
Two numbers
Inputs: 12, 18
Result: GCF 6 · LCM 36
Three numbers
Inputs: 4, 6, 8
Result: GCF 2 · LCM 24
Coprime pair
Inputs: 9, 16
Result: GCF 1 · LCM 144
Glossary
- Greatest common factor (GCF)
- The largest whole number that divides every number in a set without a remainder.
- Least common multiple (LCM)
- The smallest whole number that every number in a set divides into evenly.
- Euclidean algorithm
- An efficient method for the GCF that repeatedly takes remainders until one reaches zero.
- Least common denominator
- The LCM of the denominators of a set of fractions, used to add or compare them.
Related reading
Frequently Asked Questions
Why use GCF and LCM Calculator?
- Finds the GCF and LCM of any list of whole numbers in a single step
- Uses the exact Euclidean algorithm so results are precise for large values
- Shows the prime factorization of every number for full working
- Accepts commas, spaces, or newlines between numbers for flexible entry
Common use cases
- Simplify a fraction by dividing the numerator and denominator by their GCF
- Find the least common denominator when adding fractions with different denominators
- Work out when two repeating events coincide again using the LCM
- Reduce a ratio or scale a recipe to its smallest whole-number form
Get weekly tool tips & updates
New tools, power-user tips, and productivity hacks — delivered free every Friday.
No spam, ever. Unsubscribe with one click.
Related Calculators
Prime Number Checker
Check whether any whole number is prime, see its prime factorization if it is not, and list every prime up to it. Free and instant in your browser.
Fraction Calculator
Calculate fractions online. Add, subtract, multiply, and divide fractions and mixed numbers with step-by-step solutions. Free fraction calculator for students.
Ratio Calculator
Simplify ratios, scale them up, and solve for a missing value. Great for recipes, mixing, and aspect ratios. Free and private.
Proportion Calculator
Solve proportions for an unknown value. Enter three terms of A/B = C/D and get the fourth, with cross-multiplication shown. Free and private.
Percentage Calculator
Calculate percentages instantly. Find what X% of a number is, what percentage X is of Y, or calculate percentage change.
BMI Calculator
Calculate your Body Mass Index (BMI) instantly. Supports metric (kg/cm) and imperial (lbs/ft+in) units. Free online BMI calculator.
Explore all Calculators.