GCD & LCM Calculator
Fundamental number theory.
GCD & LCM Calculator
undefined
Calculated instantly
Embed this calculator
Put this calculator on your own site with the snippet below. The frame contains the tool only, reports its own height, and carries a visible link back to the full page. Embedding is free; keep the attribution link as it is, and do not wrap the frame in a way that hides it.
Preparing the embed code for this page...
What This Calculator Does
The GCD & LCM Calculator finds the Greatest Common Divisor and Least Common Multiple of two or more integers. GCD is the largest number that divides all given numbers without a remainder.
How It Works
GCD uses the Euclidean algorithm: repeatedly replace the larger number by the remainder of dividing the larger by the smaller. LCM = |a x b| / GCD(a, b).
Example
For 12 and 18: GCD = 6, LCM = (12 x 18) / 6 = 36.
Formula
LCM(a,b) = |a*b| / GCD(a,b)Reading the Results
GCD
The greatest number that divides both A and B evenly.
LCM
The smallest number that is a multiple of both A and B.
Frequently Asked Questions
What is GCD?
The Greatest Common Divisor is the largest positive integer that divides two or more integers without a remainder.
What is LCM used for?
LCM is used when finding common denominators for fractions, scheduling recurring events, and solving gear-ratio problems.
Can GCD work with more than 2 numbers?
Yes. GCD(a,b,c) = GCD(GCD(a,b),c). Apply the algorithm iteratively.
