Home / Calculator Guide

GCF and LCM: Meaning and Examples

The greatest common factor (GCF) is the largest positive integer that divides two integers without a remainder. For 12 and 18, the GCF is 6.

Worked explanation

The least common multiple (LCM) of two positive integers is the smallest positive common multiple. For 12 and 18, the LCM is 36. For nonzero integers, GCF(a,b) × LCM(a,b) = |a × b|.

Prime factorisation: find the GCF and LCM

Use 24 and 36. Step 1: write prime factorisations: 24 = 2^3 × 3 and 36 = 2^2 × 3^2. Step 2: for GCF, use the smaller exponent of each shared prime: 2^2 × 3 = 12. Final GCF: 12.

Step 3: for LCM, use the larger exponent of every prime: 2^3 × 3^2 = 72. Final LCM: 72. Check: 12 × 72 = 864, which equals 24 × 36.

A second example with different prime factors

Find GCF and LCM of 14 and 35. Step 1: 14 = 2 × 7 and 35 = 5 × 7. Step 2: their only shared prime factor is 7, so GCF = 7. Step 3: include each prime at its greatest exponent: 2 × 5 × 7 = 70. Final LCM: 70.

The GCF is the greatest positive integer dividing both inputs. For positive integers, the LCM is the smallest positive integer that both inputs divide evenly. This calculator requires whole-number inputs, not decimals.

Try the calculator

✦ Interactive calculatorFree · No sign-up

Enter two safe integers (positive, negative or zero). Decimals are not accepted; GCF(0,0) is undefined.

YOUR RESULT
Ready to calculate
Enter your values and choose Calculate.

Results are calculated locally in your browser. Verify critical calculations independently.

← Back to homepage