Find the GCF and LCM of any numbers.
A GCF and LCM calculator finds the Greatest Common Factor and Least Common Multiple of two or more numbers simultaneously. The GCF (also called GCD, Greatest Common Divisor) is the largest number that divides evenly into all given numbers. The LCM is the smallest number that all given numbers divide into evenly. These two values are deeply interconnected.
This calculator uses prime factorization to find both values, breaking each number down into its prime components. It shows the shared and unshared factors visually, making it clear how the GCF and LCM are determined. This is essential knowledge for fractions, algebra, number theory, and everyday math.
The prime factorization method breaks each number into its prime factors. The GCF is the product of all shared prime factors, each taken to the lowest power that appears. The LCM is the product of all prime factors, each taken to the highest power that appears. For example, 12 = 2^2 x 3 and 18 = 2 x 3^2. GCF: 2^1 x 3^1 = 6. LCM: 2^2 x 3^2 = 36.
An alternative is the Euclidean algorithm for GCF, which uses repeated division: GCF(a, b) = GCF(b, a mod b) until the remainder is 0. Then use the relationship LCM(a, b) = (a x b) / GCF(a, b). Both methods produce the same result, but prime factorization reveals more about the number structure.
Find the GCF and LCM of 24 and 36. Prime factorization: 24 = 2^3 x 3 and 36 = 2^2 x 3^2. GCF: take lowest powers of shared primes: 2^2 x 3^1 = 12. LCM: take highest powers of all primes: 2^3 x 3^2 = 72. Check: 12 x 72 = 864 = 24 x 36. Confirmed.
The GCF is the largest number that divides into all given numbers without a remainder. It is always less than or equal to the smallest input. The LCM is the smallest number that all given numbers divide into evenly. It is always greater than or equal to the largest input. For 6 and 10: GCF = 2, LCM = 30.
The numbers are coprime (or relatively prime), meaning they share no prime factors. Examples include 8 and 15, or 7 and 11. When two numbers are coprime, their LCM equals their product: LCM(8, 15) = 120 = 8 x 15.
Find the GCF of the first two numbers, then find the GCF of that result with the third number, and so on. For GCF(12, 18, 30): GCF(12, 18) = 6, then GCF(6, 30) = 6. Alternatively, use prime factorization of all numbers and take the shared primes at their lowest powers.
For any two positive integers a and b: GCF(a, b) x LCM(a, b) = a x b. This means if you know the GCF, you can find the LCM by computing (a x b) / GCF, and vice versa. This relationship only holds directly for two numbers; for three or more, the formula is more complex.
Divide both the numerator and denominator by their GCF. To simplify 24/36: GCF(24, 36) = 12. Divide both by 12: 24/12 = 2, 36/12 = 3. So 24/36 = 2/3 in lowest terms. This guarantees the fraction cannot be reduced further.
Imagine two traffic lights that cycle every 45 seconds and 60 seconds respectively. They will both turn green simultaneously every LCM(45, 60) = 180 seconds, or every 3 minutes. Similarly, if you buy hot dog buns in packs of 8 and hot dogs in packs of 6, you need LCM(8, 6) = 24 of each for no leftovers.
Let ChatGPT, Claude, or Perplexity do the thinking for you. Click a button and see what your favorite AI says about Formula Bot.
Calculate tips and split bills with ease.
Calculate your grade point average instantly.
Calculate area for any shape and convert between units.
Find square roots with step-by-step solutions.
Find out what you need on your final exam.
Solve quadratic equations step by step.
Find the missing side of a right triangle.
Calculate annuity payments and values.
Calculate dividend yield and income projections.
Solve long division with detailed steps.
Calculate your exact age in years, months, and days.
Find the slope and equation of a line.
Calculate how your investments grow over time.
Calculate sale prices and savings instantly.
Convert and calculate with scientific notation.
Calculate logarithms with any base.
Round numbers to any decimal place.
Calculate markup percentage and profit margins.
Add, subtract, multiply, and divide mixed numbers.
Calculate powers and exponents step by step.
Count and round significant figures.
Find the midpoint between two coordinate points.
Calculate percent error for experiments and data.
Convert decimals to fractions in lowest terms.
Sign up for free and unlock unlimited calculations, saved history, and more.
Get Started Free