FeaturedSpecial Offer: Unlock Premium Daily Tools & Calculators Free!
Claim Access →

LCM and GCD Calculator

An LCM and GCD calculator finds the Least Common Multiple and Greatest Common Divisor of two or more numbers using prime factorization and Euclidean algorithms. It simplifies fraction operations and modular arithmetic, showing that 12 and 18 share a GCD of 6 and an LCM of 36.

By Daniel Okoro (Mathematics Editor) · Reviewed by Maya ChenUpdated · Published

10 data points entered
Load Sample:
MEAN (AVERAGE)
7.70

Median midpoint is 8.00, Mode frequency is 8.

Sample Std Dev (s):3.433
Variance (s²):11.79
Range (Max - Min):11
Sum (Σx):77

How Does the LCM & GCD Calculator Work?

  1. Enter two or more comma-separated integers.
  2. The calculator uses the Euclidean algorithm to find the GCD.
  3. Computes the LCM using prime factor maximum powers.

What Is the LCM & GCD Formula?

LCM(a, b) = |a × b| / GCD(a, b)

Relationship between product of two integers and their greatest common divisor.

Variables
GCD:Greatest common factor dividing both numbers
LCM:Smallest positive integer divisible by both

How Do You Calculate LCM & GCD Step by Step?

Finding LCM and GCD of 12 and 18
Numbers: 12, 18

Prime factors of 12: 2² × 3

Prime factors of 18: 2 × 3²

GCD = 2 × 3 = 6

LCM = 2² × 3² = 36

Final Solution:GCD = 6, LCM = 36

LCM & GCD Questions and Answers

The Euclidean algorithm is an efficient method for computing the greatest common divisor of two integers by repeatedly taking remainders until remainder is 0.

Where Do These LCM & GCD Standards Come From?

Related Calculators & Converters