GCF, LCM and Prime Factors Calculator
Find the greatest common factor, least common multiple and prime factorization of two integers.
This calculator accepts positive whole numbers within the form limits. One has no prime factors.
How to use this calculator
Enter two positive integers. The calculator uses the Euclidean algorithm for the GCF, derives the LCM, and divides each number by possible prime factors.
Formula
GCF uses repeated remainders until zero. LCM(a,b) = |a × b| ÷ GCF(a,b). Prime factorization repeatedly divides by the smallest available prime.
Calculator credits
Calculator developmentJulia Edwards
Editorial supervisionSamad Aslam Khan
Expert reviewIfrahMSc Mathematics
Published byThe Calculatorz
Last updated
Read how we research, test, review and correct our calculators in our editorial policy.
Frequently asked questions
What is the GCF?
It is the largest positive integer that divides both numbers without a remainder.
What is the LCM?
It is the smallest positive number divisible by both entered integers.
Is 1 a prime number?
No. One has neither prime nor composite classification and has no prime factorization.
How do I use GCF to simplify a fraction?
Divide the numerator and denominator by their GCF. For 18/24, the GCF is 6, so the fraction simplifies to 3/4.
Where is LCM used in everyday life?
LCM helps find when repeating events coincide, such as two buses on different timetables, and finds common denominators when adding fractions.
How do I find the LCM of two numbers?
Divide their product by their greatest common factor. For 12 and 18, the GCF is 6, so the LCM is 12 × 18 ÷ 6 = 36.
References & methodology sources
These sources support the calculator’s formula, definitions, thresholds, units or result interpretation.
- Hardy, G. H., Wright, E. M., Heath-Brown, D. R., & Silverman, J. H. (2008). An introduction to the theory of numbers (6th ed.). Oxford University Press. View source
- Marecek, L., Anthony-Smith, M., & Honeycutt Mathis, A. (2020). Prealgebra 2e. OpenStax. View source
- Marecek, L., Anthony-Smith, M., & Honeycutt Mathis, A. (2020). Intermediate algebra 2e. OpenStax. View source
- Graham, R. L., Knuth, D. E., & Patashnik, O. (1994). Concrete mathematics (2nd ed.). Addison-Wesley. View source
- International Organization for Standardization. (2019). ISO 80000-2: Quantities and units—Part 2: Mathematics. View source