LCM and GCF Calculator
The GCF is the largest number that divides all your values; the LCM is the smallest number they all divide into. Enter two or more whole numbers to get both at once.
Your numbers
Result
- Count
- 2
| Item | Value |
|---|---|
| Numbers | 12, 18 |
| GCF (greatest common factor) | 6 |
| LCM (least common multiple) | 36 |
GCF and LCM explained
The greatest common factor (GCF, also GCD) of 12 and 18 is 6 — the biggest number dividing both. The least common multiple (LCM) is 36 — the smallest number both divide into. A handy check: for two numbers, GCF x LCM = a x b (6 x 36 = 12 x 18).
Where they are used
The GCF simplifies fractions (divide top and bottom by it) and splits things into equal groups. The LCM finds a common denominator when adding fractions and lines up repeating cycles — like when two events on different schedules coincide.
Frequently asked questions
Sources
- Number theory — LCM and GCF (Euclidean algorithm)
Embed this calculator
Copy the code and paste it into your site or blog. Credit with a link back to Contania is included, and the height adjusts itself.
<iframe src="https://contania.app/embed/math/lcm-gcd" title="LCM and GCF Calculator" width="100%" height="720" loading="lazy" style="border:1px solid #e5e0d8;border-radius:12px;max-width:640px"></iframe>
<script>window.addEventListener("message",function(e){if(e.data&&e.data.type==="contania:embed-height"){var f=document.querySelector('iframe[src="https://contania.app/embed/math/lcm-gcd"]');if(f){f.style.height=e.data.height+"px"}}});</script>Related calculators
Prime Number
Check whether a number is prime, see its prime factorization if it is not, and find the next prime number.
CalculateMathFractions
Add, subtract, multiply and divide fractions, with the result already simplified and shown as a decimal. Enter the numerators and denominators.
CalculateMathFactorial
Calculate the factorial of a number (n!) — the product of all whole numbers from 1 to n. Exact results for large values using big-integer math.
CalculateMathLinear Equation
Solve a linear equation of the form ax + b = cx + d for x, with the step-by-step work. Handles no-solution and infinite-solution cases.
CalculateMathPercentage
Work out percentages three ways: what is X% of a number, what percent one number is of another, and finding the whole from a part and its percentage.
CalculateMathPercentage Change
Find the percentage change between two numbers — an increase or a decrease. Enter the old and new values to see the percent change, the absolute change and the direction.
Calculate