GCF & LCM Calculator

Find the greatest common factor (GCF) and least common multiple (LCM) of two or more numbers.

Written by Ahmet Tur · Reviewed by Kübra Yıldız · Updated

Enter 2–10 numbers separated by commas: 12, 18, 24

Your result will appear here

Fill in the fields and press Calculate.

The GCF and LCM find the "common language" of numbers: the greatest common factor (GCF) is the largest number that divides them all, and the least common multiple (LCM) is the smallest number they all divide into. From simplifying fractions to solving problems, from gear ratios to repeating schedules, they come up everywhere — and they are two sides of one coin.

Enter 2 to 10 numbers separated by commas, and the GCF and LCM are calculated instantly, with their classic relationship as a check.

GCF & LCM Calculator: step-by-step worked example

GCF and LCM of 24 and 36.

Example inputs
Numbers
24, 36
  1. 1

    Prime-factorize each number

    a = p₁ᵉ¹ × p₂ᵉ² × …

    = 24 = 2³ × 3 · 36 = 2² × 3²

  2. 2

    GCF: common primes, lowest powers

    GCF = Π pᵐⁱⁿ⁽ᵉ⁾ (primes common to all)

    2² × 3 = 12

  3. 3

    LCM: all primes, highest powers

    LCM = Π pᵐᵃˣ⁽ᵉ⁾ (every prime)

    2³ × 3² = 72

  4. 4

    Check (two numbers): a × b = GCF × LCM

    a × b = GCF × LCM

    12 × 72 = 864

Result · GCF12
The numbers, GCF and LCM
  • GCF12
  • 2424
  • 3636
  • LCM72

Good to know: Word problems: “largest equal pieces / cutting” → GCF; “together again / at the same time / smallest amount” → LCM. Coprime numbers have GCF 1 and LCM equal to their product.

GCF & LCM Calculator — how it works

Definitions

  • GCF (greatest common factor): the largest number that divides all the given numbers with no remainder.
  • LCM (least common multiple): the smallest positive number that all the given numbers divide into evenly.

Finding them with prime factorization

Break each number into prime factors: - GCF = product of the common prime factors raised to their SMALLEST exponents - LCM = product of all prime factors raised to their LARGEST exponents

For 24 = 2³ × 3 and 36 = 2² × 3²: GCF = 2² × 3 = 12; LCM = 2³ × 3² = 72.

The golden identity (check)

For two numbers: GCF × LCM = the product of the numbers. For 24 and 36, 12 × 72 = 864 = 24 × 36. This holds only for two numbers; the tool shows it for two-number input. With more than two numbers, GCF and LCM are each found over all the numbers.

Where it is used

  • GCF: simplifying fractions, splitting a quantity into the largest equal parts, reducing a common denominator.
  • LCM: common denominators for fractions, when periodic events coincide (two buses leaving at the same time), gear and lap calculations.

Worked example

Take 24 and 36: 24 = 2³ × 3, 36 = 2² × 3². Using the smallest exponents of the common factors, GCF = 2² × 3 = 12; using the largest exponents of all factors, LCM = 2³ × 3² = 72. Check: 12 × 72 = 864 and 24 × 36 = 864 — an exact match. If you went to three numbers and entered 12, 18, 30, the GCF would be 6 (the largest number dividing all three); this time the product identity does not apply, because that rule is only for two numbers.

GCF and LCM of common number pairs

NumbersGCFLCM
4 and 6212
6 and 8224
8 and 12424
9 and 12336
10 and 15530
12 and 18636
12 and 20460
14 and 21742
15 and 25575
16 and 24848
18 and 27954
20 and 301060
24 and 361272
36 and 4812144
45 and 6015180
72 and 9624288

For two numbers, GCF × LCM equals their product.

Frequently asked questions

How are the GCF and LCM calculated?+

By prime factorization. The GCF is the product of the common prime factors at their smallest exponents; the LCM is the product of all prime factors at their largest exponents. The tool does this for 2–10 numbers.

What is the difference between GCF and LCM?+

The GCF is the largest number that divides the given numbers (smaller than their product); the LCM is the smallest number they divide into (at least as large as the biggest number). GCF is a division problem, LCM a multiple problem.

Is GCF × LCM = the product of the numbers always true?+

Only for TWO numbers: GCF × LCM = a × b. With more than two numbers the identity generally fails; each is computed separately.

Can I find the GCF and LCM of more than two numbers?+

Yes — the tool accepts 2 to 10 comma-separated numbers. The GCF is the largest number dividing all of them; the LCM is the smallest number they all divide into.

How is the GCF used to simplify a fraction?+

Divide the numerator and denominator by their GCF: for 24/36 the GCF is 12, so 24÷12 / 36÷12 = 2/3 in lowest terms.

Why is "when do two buses leave together" an LCM problem?+

If one leaves every 24 minutes and the other every 36, the first time they coincide is the LCM of those intervals: minute 72. Coinciding periodic events are always found with the LCM.

About this page

Publisher:
Kalkoro — Teknolojig Bilişim Teknolojileri A.Ş., İstanbul
Written by:
Ahmet Tur — Editor (Math, date & time, unit conversion, physics & chemistry, everyday tools)
Reviewed by:
Kübra Yıldız — Editor

Parameters come from official sources; the last update date is shown at the bottom of the page.

Spotted a wrong result? Use the "Report a bug" button at the top of the page; every report is reviewed.

How we calculate and our accuracy policy →

Results are for information only. For official matters the relevant authority's calculation prevails.

Last updated: