GCF and LCM Calculator
How can quantities be divided into equal groups, and when do repeating cycles meet again? Find the greatest common factor and least common multiple with prime factorizations.
Start calculating – enter your values
Calculate now
The GCF divides every input without a remainder. For nonzero inputs, the LCM is the smallest positive integer divisible by all inputs. Negative signs do not change either result.
Model scope, review and sourcesScope, model baseline and responsible sources
Scope and assumptions
The calculation itself is country-independent. Language and display choices do not change its mathematical logic.
- Model
- Country-independent calculation
- Reference region
- International
- Currency
- No monetary calculation
- Units
- No unit conversion needed
Who is responsible for this model
Find out who is responsible for this content, what has been checked, how the calculation works and which primary sources it uses. If no external professional review is named, none has taken place.
- Responsible editor
- Jens Marx
- Latest editorial and technical review
- Review
- Internal editorial and technical review
- Calculation basis
- Common factors and multiples v1
Review scope: Formulas, input formats, examples and model limits are checked internally. No external professional review has been carried out.
Common questions
What is the difference between GCF and LCM?
The GCF is a shared divisor of the inputs; the LCM is a shared multiple. For 12 and 18, they are 6 and 36.
Can I enter negative integers?
Yes. The calculation uses their absolute values. Thus -12 and 18 have the same GCF and LCM as 12 and 18.
Is a very large LCM rounded?
No. Results beyond ordinary floating-point integer precision are calculated exactly and displayed in full.
How do I compare several results?
Calculate your first result, then open “Compare your scenarios and document the evidence” below it and select “Capture displayed result”. Change the inputs, calculate again and capture the next result. You can compare up to three results. Leaving or reloading the page clears the captured scenarios and notes unless you export them first.
How do I save and reopen a comparison?
In the scenario comparison, “Export comparison (CSV)” downloads a table for documentation. To reopen the comparison here later, use “Save archive for later” to download a JSON file, then import it in the same calculator. Imported results are unverified archive values. Select “Restore inputs and recalculate” and check the current result before capturing it again.