GCF and LCM Calculator

Find the greatest common factor and least common multiple of 2 to 4 numbers with factor tables, fold steps, divisor lists, and common-multiple outputs.

GCF and LCM rules
GCF comes from the shared prime factors with the smallest exponents. LCM comes from every prime factor needed with the largest exponents. For two numbers, GCF(a,b) ร— LCM(a,b) = a ร— b.
Greatest common factor
4
Largest factor shared by every input number
Least common multiple
120
Smallest positive number that every input divides evenly
Coprime set?
No
They share factors up to 4
First common multiple
120
The first entry in the repeated common-multiple pattern
Common divisors listed
3
The first 3 divisors of the GCF are shown below
Checked number
4
Common factor for the current set
LCM/GCF ratio
30.00
Higher ratios mean the numbers share fewer factors relative to their alignment cycle
Smallest input
8
The GCF can never exceed the smallest number in the set

Magnitude visual

Number 18
Number 212
Number 320
GCF4
LCM120

Prime-factor table

Value235
83โ€“โ€“
1221โ€“
202โ€“1

Pairwise fold steps

Left valueRight valueGCFLCM
812424
24204120

Common values

TypeValues
Common divisors1, 2, 4
First 6 common multiples120, 240, 360, 480, 600, 720
Planning notes, formulas, and examples

About the GCF and LCM Calculator

<p>The <strong>GCF and LCM Calculator</strong> finds the greatest common factor and least common multiple for two, three, or four positive integers. These two values show opposite kinds of structure: the GCF tells you what the numbers share in common as factors, while the LCM tells you where their repeating multiple patterns line up for the first time.</p> <p>That makes the calculator useful in several settings. GCF is used when simplifying ratios, reducing fractions, and finding the largest identical grouping that fits a set of quantities exactly. LCM is used when building common denominators, aligning schedules, synchronizing cycles, and identifying the first shared multiple of different repeating intervals.</p> <p>Instead of only returning two numbers, this calculator shows the prime-factor exponents behind the answer, a pairwise fold table for multi-number calculations, a list of common divisors and common multiples, and a magnitude visual that compares the inputs with the final GCF and LCM. It is designed to help you understand the relationship between the numbers, not just get the answer faster.</p>

When This Page Helps

When several numbers are involved, it is easy to lose track of shared factors or stop at the wrong multiple. This calculator keeps the GCF and LCM side by side so you can see both the shared-factor view and the shared-multiple view without redoing the same work twice. That makes it useful when you need to compare grouping logic and common-denominator logic on the same set of inputs.

How to Use the Inputs

  1. Choose whether you want to analyze 2, 3, or 4 numbers.
  2. Enter each positive integer in the input fields.
  3. Set how many common multiples and common divisors you want listed.
  4. Optionally enter a separate number to test whether it is a common factor or common multiple of the set.
  5. Review the output cards for the final GCF and LCM values.
  6. Use the factor table, fold steps, and common-values table to understand how the results were built.
Formula used
GCF uses the shared prime factors with the smallest exponents. LCM uses all prime factors needed with the largest exponents. For two numbers a and b, GCF(a,b) ร— LCM(a,b) = a ร— b.

Example Calculation

Result: GCF = 4, LCM = 120

The common factor among 8, 12, and 20 is 4, and the first positive number divisible by all three values is 120.

Tips & Best Practices

  • The GCF is the shared-factor side of the problem and the LCM is the shared-multiple side.
  • If the GCF is 1, the numbers share no factor above 1.
  • For two numbers, the GCF and LCM identity is a quick way to verify your work.
  • Prime-factor tables make it easier to see why the GCF uses minimum exponents and the LCM uses maximum exponents.
  • When adding fractions, you usually need the LCM of the denominators rather than the GCF.

GCF and LCM as Opposite Views

GCF looks downward to shared factor structure, while LCM looks upward to shared multiple structure. Together they describe how tightly numbers overlap and how long it takes their repeating patterns to align.

Prime Factorization Method

Prime factorization makes both values easier to compute conceptually. For the GCF, keep only the primes that appear in every number and use the smallest exponent. For the LCM, include every prime that appears anywhere and use the largest exponent.

Real Uses Beyond Classwork

GCF appears in packaging, batching, and fraction simplification. LCM appears in scheduling, music rhythms, gears, denominator alignment, and any problem where periodic events need to meet again.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • The greatest common factor is the largest positive integer that divides every number in the set evenly. It is the shared factor that all of the inputs still have in common.