GCD and LCM Calculator

Two or more, separated by commas or spaces (up to 50).

Results

Greatest common divisor (GCD)
—
Least common multiple (LCM)
—

Prime factors

    The GCD is the largest number that divides all of yours; the LCM is the smallest number all of yours divide into. Useful for simplifying fractions, common denominators and timing repeating events.

    How to use it

    1. Type two or more whole numbers, separated by commas or spaces.
    2. Read the GCD and LCM, and the prime factors of each number.

    Example: for 12, 18 and 30 the GCD is 6 and the LCM is 180.

    Questions and answers

    Are GCD, GCF and HCF the same thing?

    Yes. Greatest common divisor, greatest common factor and highest common factor are three names for the same number.

    How do prime factors give the GCD and LCM?

    The GCD takes each prime the numbers share, with its smallest power; the LCM takes every prime that appears, with its largest power. 12 = 2² × 3 and 18 = 2 × 3², so the GCD is 2 × 3 = 6 and the LCM is 2² × 3² = 36.

    What is the LCM used for in real life?

    Finding when repeating things line up: buses every 12 and 18 minutes leave together again after 36 minutes.

    Link with pre-filled values

    Add # and these parameters to the end of this page's address to open the tool with values already filled in.

    ParameterWhat it sets
    numbersWhole numbers separated by commas.

    Example: https://toolabelle.com/gcd-lcm-calculator/#numbers=12%2C18%2C30

    Related tools