GCD & LCM Calculator -- Greatest Common Divisor

Visualize factors and find GCD/LCM instantly

Calculate GCD & LCM

Try common examples:
&
GCD
Greatest Common Divisor
โ€”
Largest number that divides both evenly
LCM
Least Common Multiple
โ€”
Smallest number both divide into
๐Ÿ“Š Factor Breakdown
Factors of
โ€”
Common Factors
GCD = โ€”
Factors of
โ€”
๐Ÿงฎ Euclidean Algorithm Steps
๐Ÿงฉ Prime Factorization View
First Number
โ€”
Second Number
โ€”
GCD Prime Form
โ€”
LCM Prime Form
โ€”

LCM takes the highest power of each prime. GCD takes the lowest shared power.

LCM ร— GCD = A ร— B

The product of GCD and LCM always equals the product of the two original numbers. This is the fundamental relationship that lets us calculate LCM once we know GCD.

Quick Reference

Concept Definition Example
GCD Largest number that divides both numbers evenly GCD(12, 18) = 6
LCM Smallest number that both numbers divide into LCM(12, 18) = 36
Coprime Numbers with GCD = 1 (no common factors) GCD(7, 11) = 1
Relation LCM(a, b) ร— GCD(a, b) = a ร— b 36 ร— 6 = 12 ร— 18

About GCD and LCM

The Greatest Common Divisor (GCD) is the largest whole number that divides two numbers evenly. It's useful for simplifying fractions, finding common denominators, and solving problems involving repeated patterns.

The Least Common Multiple (LCM) is the smallest number that both input numbers divide into without a remainder. It's essential for adding fractions, scheduling problems, and finding when cycles align.

Common Uses

  • Fractions: Use GCD to reduce fractions to lowest terms (e.g., 12/18 โ†’ 2/3)
  • Scheduling: Use LCM to find when events with different cycles coincide
  • Music: Finding common time signatures and beat patterns
  • Construction: Determining tile sizes that fit perfectly into dimensions
  • Programming: Optimizing loop iterations and array operations

The Euclidean Algorithm

This calculator uses the Euclidean algorithm, an efficient method discovered by the ancient Greek mathematician Euclid around 300 BCE. It works by repeatedly dividing and taking remainders until reaching zero. The last non-zero remainder is the GCD.

Privacy & Limitations

  • All calculations run entirely in your browser -- nothing is sent to any server.
  • Results are computed using standard formulas and should be verified for critical applications.

Related Tools

Related Tools

View all tools

GCD & LCM Calculator FAQ

What is GCD & LCM Calculator?

GCD & LCM Calculator is a free math basics tool that helps you Find the greatest common divisor and least common multiple.

How do I use GCD & LCM Calculator?

Enter your input values, review the calculated output, and adjust inputs until you reach the result you need. The result updates in your browser.

Is GCD & LCM Calculator private?

Yes. Calculations run locally in your browser. Inputs are not uploaded to a server by default, and refreshing the page clears session data.

Does GCD & LCM Calculator require an account or installation?

No. You can use this tool directly in your browser without sign-up or software installation.

How accurate are results from GCD & LCM Calculator?

This tool applies standard formulas or deterministic processing logic for estimates. For medical, legal, tax, or investment decisions, verify with a qualified professional.

Can I save or share outputs from GCD & LCM Calculator?

You can bookmark this page and copy outputs manually. Results are not persisted in your account and are typically not embedded in the URL.

Request a New Tool
Improve This Tool