UtilityBase logoUtilityBase

Calculators

GCF & LCM Calculator

GCF, LCM, and prime factorization — plus a prime-or-composite check for a single number.

Updated July 9, 2026

How to use the gcf & lcm calculator

  1. 1Enter a single number to check if it's prime and see its factorization.
  2. 2Or enter two or more whole numbers, separated by commas, for GCF and LCM.
  3. 3Study the prime factorizations to see how both were built.
  4. 4Use the GCF × LCM check when working with two numbers.

Common uses

  • Reducing fractions with the GCF
  • Finding common denominators with the LCM
  • Showing prime-factorization work on homework
  • Figuring when repeating schedules coincide

Frequently asked questions

What's the difference between GCF and LCM in plain terms?

GCF is the largest number that divides evenly into all of yours — the biggest equal groups you can split things into. LCM is the smallest number all of yours divide into — the first time repeating cycles line up. Concretely: GCF(12, 18) = 6 reduces 12/18 to 2/3; LCM(4, 6) = 12 means two events every 4 and 6 days coincide every 12.

Are GCD and HCF the same as GCF?

Yes — greatest common divisor (GCD), highest common factor (HCF), and greatest common factor (GCF) are one concept with regional naming: GCF dominates US classrooms, HCF is common in UK and Indian curricula, GCD in higher math and programming. Any teacher accepts any of them.

How does the prime factorization method work?

Break each number into primes — 12 = 2² × 3, 18 = 2 × 3². For GCF, take each prime appearing in all numbers at its lowest power: 2 × 3 = 6. For LCM, take every prime that appears anywhere at its highest power: 2² × 3² = 36. The calculator displays exactly this so you can copy the method onto homework.

Does GCF × LCM = the product always work?

For exactly two numbers, always — GCF(a,b) × LCM(a,b) = a × b, shown as a check whenever you enter two. With three or more numbers the identity breaks down, which is a classic trick-question fact: GCF(2,4,6) × LCM(2,4,6) = 2 × 12 = 24, but 2 × 4 × 6 = 48.

About this tool

The GCF & LCM calculator finds the greatest common factor and least common multiple of two or more numbers, and shows the prime factorization work: each number broken into primes, with the rule spelled out — GCF takes each shared prime at its lowest power, LCM takes every prime at its highest. It verifies the classic identity for two numbers (GCF × LCM = the product), which is the standard homework check. Enter a single number instead and it becomes a prime checker: it tells you whether the number is prime or composite, shows the full prime factorization, and counts the divisors. Computation uses the Euclidean algorithm and trial division, so even ten-digit numbers are instant. GCF is what reduces fractions; LCM is the common denominator that adds them — the fraction calculator applies both automatically.

Like most tools on UtilityBase, the gcf & lcm calculator runs entirely in your browser — nothing you enter is uploaded or stored on a server. It's free to use with no account required. Browse more calculators here.

Was this tool helpful?

Related tools