AznikaHubFree toolsMathMint
🔒 Calculations run in your browser. We keep basic visit stats to improve the site — see Privacy Policy.

🔗 GCF and LCM Calculator

Enter two or more whole numbers separated by commas or spaces to get their GCF and LCM.

GCF and LCM

How the GCF and LCM Calculator works

The GCF is found with the Euclidean algorithm. The LCM of two numbers is their product divided by their GCF, repeated across the list.

GCF(a, b): repeat a, b → b, a mod b until b = 0 LCM(a, b) = |a × b| ÷ GCF(a, b)

Step-by-step calculation

  1. 1Enter whole numbers.
  2. 2Find the GCF with the Euclidean algorithm.
  3. 3LCM = product ÷ GCF.

Worked example

For 12, 18 and 30: GCF = 6 and LCM = 180.

GCF and LCM Calculator examples

Whole numbersGCF and LCM
8, 12GCF 4 · LCM 24
12, 18, 30GCF 6 · LCM 180
15, 25GCF 5 · LCM 75
6, 21GCF 3 · LCM 42
9, 27, 36GCF 9 · LCM 108

Other inputs kept at the calculator's default values. Results calculated by this calculator.

Why use a GCF and LCM Calculator?

Simplify fractions and find common denominators.

Important factors that can affect your results

  • Only whole numbers.
  • Zero is excluded.
  • Very large LCMs.

Frequently asked questions

Where are these used?

GCF simplifies fractions; LCM finds common denominators and when repeating events line up.

Is GCF the same as GCD and HCF?

Yes — greatest common factor, greatest common divisor and highest common factor are the same thing.

Related calculators

Last reviewed November 2026 · How we build and check our tools · Report a problem

🧮Types of calculators