GCD
--
Free · Instant · No signup
Euclidean GCD and LCM = |A x B| / GCD for two integers.
Page updated 2026-09-04.
GCD
--
LCM
--
48 and 18 have a greatest common divisor (GCD) of 6 and a least common multiple (LCM) of 144 -- the largest number that divides both evenly, and the smallest number both divide into evenly, respectively.
GCD and LCM are connected by a clean identity: GCD x LCM = A x B, which you can verify here: 6 x 144 = 864, and 48 x 18 = 864 -- the same result either way, which is a useful sanity check whenever you calculate both values for the same pair of numbers.
48 = 6 x 8 and 18 = 6 x 3 shows the GCD (6) is the shared factor between the two numbers, while 144 = 48 x 3 = 18 x 8 shows the LCM as the smallest shared multiple -- both figures come directly from the two numbers' prime factorizations (48 = 2⁴ x 3, 18 = 2 x 3²).
LCM of 0 and n is 0. Inputs are rounded to integers. If either input is 0, the LCM is defined as 0 -- since 0 is a multiple of every number (0 x anything = 0), the 'smallest common multiple' involving 0 is trivially 0 itself, a special case worth knowing since it doesn't follow the same intuitive pattern as LCM calculations between two positive numbers.
Non-integer inputs are rounded to the nearest whole number before the calculation runs, since GCD and LCM are only defined for integers -- a fractional input like 48.6 would be rounded to 49 before finding its GCD and LCM with the other number.
GCD is commonly used to simplify fractions (dividing numerator and denominator by their GCD), while LCM is commonly used to find a common denominator when adding or comparing fractions with different denominators -- two genuinely different practical applications of the same pair of related calculations.
For applying the GCD concept directly to simplify a ratio into its lowest terms, the Ratio/Fraction Simplifier Calculator performs exactly that calculation.
6 is the largest number that divides evenly into both 48 (48/6 = 8) and 18 (18/6 = 3). Looking at prime factorizations confirms this: 48 = 2⁴ x 3 and 18 = 2 x 3², sharing a factor of 2 x 3 = 6.
144 is the smallest number that both 48 and 18 divide into evenly (144/48 = 3, 144/18 = 8). It can also be derived from the GCD identity: LCM = (A x B) / GCD = (48 x 18) / 6 = 864 / 6 = 144.
LCM of 0 and n is 0. Inputs are rounded to integers. LCM is defined as 0 in that case, since 0 is technically a multiple of every number. This is a special-case rule worth knowing, since it doesn't follow the intuitive pattern of LCM between two positive numbers.
LCM of 0 and n is 0. Inputs are rounded to integers. Not directly -- decimal inputs are rounded to the nearest whole number before calculating, since GCD and LCM are only mathematically defined for integers.
LCM is most commonly needed when adding or comparing fractions with different denominators (finding a common denominator), while GCD is most commonly used to simplify a fraction or ratio down to its lowest terms -- different practical problems, related by the same underlying number theory.
QR Code Generator Static QR codes in the browser.
Daily Water Intake Calculator Daily water from weight, exercise minutes, and climate, in oz, liters, or cups.
Whitespace / Extra Space Cleaner Collapse runs of spaces and tabs to one space and trim the edges of the text.
ROT13 & Cipher Generator Rotate A-Z letters by a chosen shift (13 by default). Digits and punctuation stay put.