LCM & GCD Calculator

Find the Least Common Multiple (LCM) and Greatest Common Divisor (GCD/HCF) with prime factor trees and Euclidean steps.

Quick Presets:

Works for 2, 3, 4, or more integers up to 10,000,000. Examples: 24, 36 or 12 18 30.

Greatest Common Divisor (GCD / HCF)
12

The highest integer that divides all 2 numbers without remainder.

Least Common Multiple (LCM)
72

The smallest positive multiple shared by all 2 numbers.

Prime Factorization Decomposition

Every integer has a unique representation as a product of prime powers:

Number 124
Prime Factors:
2^3 × 3
Number 236
Prime Factors:
2^2 × 3^2

Euclidean Algorithm Division Steps (for GCD)

Repeated division remainder method discovered by Euclid of Alexandria (~300 BC).

StepDividend=Divisor × Quotient+ Remainder
136=24 × 1+ 12
224=12 × 2+ 0

* The last non-zero remainder (12) is the Greatest Common Divisor (GCD).

Understanding LCM & GCD (HCF)

Greatest Common Divisor (GCD / HCF)

The GCD (also known in India and the UK as the Highest Common Factor or HCF) is the largest integer that divides two or more numbers without leaving any remainder.

GCD(24, 36) = 12 (since 12 divides 24 and 36 evenly)

Least Common Multiple (LCM)

The LCM is the smallest non-zero positive integer that is divisible by all numbers in the set. It represents the first synchronized point where their multiples meet.

LCM(24, 36) = 72 (Multiples: 24, 48, 72... and 36, 72...)

The Fundamental Product Rule

For any two positive integers a and b, the product of their LCM and GCD is always strictly equal to the product of the numbers themselves:

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

Prime Factorization Method

Break each number down into its prime building blocks. To find the GCD, multiply the lowest powers of common primes. To find the LCM, multiply the highest powers of all prime factors.

LCM & GCD Calculator FAQs

Common questions on factors, multiples, and Euclidean arithmetic.

What is the difference between HCF and GCD?

There is no difference in mathematical meaning. HCF stands for Highest Common Factor (widely used in CBSE, ICSE, and British curricula), while GCD stands for Greatest Common Divisor (standard in American textbooks). They refer to the exact same number.

Does the LCM × GCD = a × b formula work for three or more numbers?

No. The formula LCM(a, b) × GCD(a, b) = a × b strictly applies only to pairs of numbers. For three or more numbers, prime factorization or repeated Euclidean reduction must be used.

What does it mean if the GCD of two numbers is 1?

When GCD(a, b) = 1, the numbers are called 'coprime' or 'relatively prime'. They share no common divisors other than 1 (for example, 8 and 15). Their LCM is simply their product: 8 × 15 = 120.

How is LCM used in real-life problems?

LCM is fundamental whenever cyclical events repeat at different intervals: determining when traffic lights change simultaneously, calculating when two runners on a circular track lap each other, or adding fractions with unlike denominators.

Is this LCM & GCD calculator free and private?

Yes! The algorithms run 100% locally in your web browser. No data is sent to external servers, providing instantaneous results with zero latency and complete privacy.

Found this LCM & GCD Calculator helpful? Share with friends:

More Calculators Tools

Scientific Calculator

ClassWiz-style scientific calculator simulation with dual-line LCD, 50+ constants vault, equation solvers, and statistics.

Percentage Calculator

Calculate percentages of numbers, proportions, and percent changes with real-time visual progress bars and step-by-step proofs.

Fraction Calculator

Add, subtract, multiply, and divide fractions and mixed numbers with step-by-step simplification and common denominators.

EMI Calculator

Calculate monthly EMI for Home, Car, and Personal loans instantly. View principal vs interest breakdown and amortization schedules.

SIP Calculator

Calculate your Mutual Fund SIP returns instantly. Estimate future wealth, compounding returns, and expected capital gains.

Compound Interest Calculator

Forecast long-term wealth growth, compounding returns, and doubling time with annual or monthly schedules.

FD Ladder Calculator

Optimize fixed deposit yields and stagger maturities for planned periodic liquidity and systematic reinvestment.

GST Calculator

Instant inclusive and exclusive GST calculation with 5%, 12%, 18%, 28% rates and CGST/SGST/IGST breakdown.

BMI Calculator

Calculate your Body Mass Index (BMI), WHO health category indicators, and ideal healthy weight target.

BMR & Calorie Calculator

Calculate Basal Metabolic Rate using the clinical Mifflin-St Jeor equation and find your daily TDEE calorie targets.

Age Calculator

Calculate exact age in years, months, and days instantly. High-precision tool for official applications and records.

Universal Unit Converter

Convert between metric and imperial units for length, weight, temperature, area, speed, and digital file sizes.

Word & Character Counter

Count words, characters, sentences, paragraphs, reading time, and analyze keyword density in real-time.

Other Popular Tools