LCM & GCF Calculator

Find the LCM and GCF of a list of numbers, with prime factorisations.

Common Factors And Multiples, With The Primes Shown

Enter two or more whole numbers and get their greatest common factor — also called the greatest common divisor or highest common factor — and their least common multiple, along with the prime factorisation of each number so you can see where the answer comes from.

The GCF takes every prime the numbers share at its lowest power; the LCM takes every prime at its highest. That is also how you find the lowest common denominator for adding fractions: it is the LCM of the denominators. Numbers up to 30 digits are handled in milliseconds.

Key features

  • Any count of numbers — separate them with commas or spaces.
  • Prime factorisations written with exponents, for checking by hand.
  • GCF, GCD and HCF — three names, one answer.
  • Big numbers — up to 30 digits, factorised with Pollard’s rho.
  • Coprime check — see at a glance when the only common factor is 1.
100% client-side — no data leaves your machine

This tool runs entirely inside your browser using native Web APIs. Your files and text are never uploaded to a server, never logged and never shared with third parties.

How to use: LCM & GCF Calculator

  1. Enter the numbers
    Two or more positive whole numbers, separated by commas or spaces.
  2. Read the GCF and LCM
    Both update as you type.
  3. Check the factorisations
    Each number is broken into primes with exponents.
  4. Use it for fractions
    The LCM of the denominators is the lowest common denominator.

Technical specifications

Processing locationEntirely in your browser — no server round trip
Data uploadedNone. Files and text never leave your device
PriceFree — no account, no trial, no usage cap
CategoryCalculators
Works offlineYes, once the page has loaded
Browser supportChrome 90+, Edge 90+, Firefox 90+, Safari 15+
Interface languagesEnglish, 中文, हिन्दी, Español, العربية

Frequently asked questions

What is the difference between LCM and GCF?

The greatest common factor is the largest number that divides all of them exactly. The least common multiple is the smallest number all of them divide into. For 12 and 18 the GCF is 6 and the LCM is 36.

Are GCF, GCD and HCF the same thing?

Yes. Greatest common factor, greatest common divisor and highest common factor are three names for the same number; which one you learnt depends on the country and the textbook.

How do I find the lowest common denominator?

Enter the denominators of the fractions. Their least common multiple is the lowest common denominator — convert each fraction to it, then add or subtract the numerators.

Is there a quick check between the two?

For two numbers, GCF × LCM equals the product of the numbers. For 12 and 18: 6 × 36 = 216 = 12 × 18. It does not hold for three or more numbers.

What does coprime mean?

Two numbers are coprime when their greatest common factor is 1 — they share no prime factors, like 8 and 15. Their LCM is then simply their product.

Related tools

Back to all tools