Greatest Common Factor and Least Common Multiple Calculator
Find the greatest common factor and least common multiple of two integers.
Calculator InputsFormula v1.0
LCM(a,b) = |a × b| / GCF(a,b)
Greatest common factor
Formula and method
LCM(a,b) = |a × b| / GCF(a,b)Inputs are treated as integers; zero inputs have special LCM behavior.
Variables
- a
- First integer
- b
- Second integer
Worked example
The GCF of 12 and 18 is 6; the LCM is 36.
Who this calculator is for
Students, teachers, and people simplifying fractions or working with multiples.
Complete guide to the greatest common factor and least common multiple calculator
Every figure below comes from this calculator itself. The method is LCM(a,b) = |a × b| / GCF(a,b), applied to the tool's default inputs and then stress-tested one input at a time.
What the Greatest Common Factor and Least Common Multiple Calculator works out
Greatest Common Factor and Least Common Multiple Calculator answers one specific question: Find the greatest common factor and least common multiple of two integers. It is written for students, teachers, and people simplifying fractions or working with multiples.
The method is LCM(a,b) = |a × b| / GCF(a,b). The inputs are First integer, Second integer. With the default values - First integer = 12, Second integer = 18 - the result is Greatest common factor: 6. Raising First integer from 12 to 13.20 moves the headline result from 6 to 1.
Working through the reported figures
Alongside 6 this method reports 2 supporting quantities: Least common multiple: 36; Inputs treated as integers: 12, 18. Taken together they show which input moved the answer and by how much.
The worked example is: The GCF of 12 and 18 is 6; the LCM is 36. Use it to confirm the direction of the calculation before entering your own figures, and keep intermediate values unrounded until the final step.
How to interpret the answer
Inputs are treated as integers; zero inputs have special LCM behavior.
Applying that reading here: 6 alongside least common multiple of 36 describes one specific scenario, not a range of possibilities. Adjust the quantity that is genuinely uncertain in your case, then read both figures again.
The same formula can be run backwards: begin with the answer you need and solve for whichever input is under your control. Starting from 6 is the quickest way to see which lever matters.
Run one deliberately rough version of this calculation first; if 6 moves in the direction and by the order of magnitude you expect, the inputs were read as intended.
Common mistakes to avoid
Assuming LCM is always the product of the two numbers; that is only true when they share no common factor. Entering decimals or negatives for a problem about factors, where only positive integers have a defined factor structure.
Before you act on the result, re-read First integer, Second integer and confirm each entry matches its label, including whether a quantity is entered in the unit the label names. Change First integer deliberately and check that the result moves the way the formula predicts - here 6 should shift smoothly rather than jump.
Limitations and responsible use
Handles two integers at a time; more numbers need repeated application. The displayed greatest common factor is the positive GCF, since sign has no meaning for divisibility.
Treat everything above as conditional on those limits. The arithmetic is fully exposed for you to re-derive, though whether the inputs reflect your real position is outside what any calculator can check. For a consequential decision, verify the operative figures against a primary source before relying on the answer.
Frequently asked questions
What are the GCF and LCM of 12 and 18?
Both divide by 6, and 12 × 18 ÷ 6 = 36. The GCF is 6 and the LCM is 36, which is smaller than the product of 216 because the two numbers share factors.
How do I add fractions with different denominators?
Use the LCM as the common denominator. For 1/12 + 1/18, the LCM 36 gives 3/36 + 2/36 = 5/36, which avoids the larger common denominator of 216.
Related Mathematics Calculators
Explore another calculator in this subject.
Scientific Calculator – Free Online Calculator With Trig, Logs & Memory
A full scientific calculator with DEG/RAD trigonometry, inverse and hyperbolic functions, powers, roots, logarithms, factorials, percentages, constants, memory registers, Ans recall and a running calculation tape.
Basic Calculator – Free Online Four-Function Calculator
Add, subtract, multiply, divide, and take percentages with a clean four-function calculator that also reports the running expression and a transparent result breakdown.
Random Number and Password Generator
Generate cryptographically strong random integers in a range, unique lottery-style picks, or secure passwords with configurable length and character classes.