GCF and LCM Calculator
Enter two or three positive whole numbers to find their greatest common factor and least common multiple.
Your numbers
How we calculate it
The GCF is found with the Euclidean algorithm: repeatedly replace the larger number with the remainder when divided by the smaller until the remainder is zero. The last non-zero value is the GCF.
The LCM of two numbers is a × b ÷ GCF(a, b). For three numbers, the LCM of the first two is combined with the third.
Assumptions and limits
- Only positive integers are accepted.
- Use the GCF to simplify fractions and the LCM to find a common denominator.
Frequently asked questions
What is the GCF of 48 and 180?
It is 12, the largest number that divides both exactly.
What is the difference between GCF and LCM?
The GCF is the largest number that divides all the inputs. The LCM is the smallest number that all the inputs divide into.
How do I use the LCM to add fractions?
The LCM of the denominators is the least common denominator. Convert each fraction to that denominator, then add the numerators.
Related calculators
- Percentage CalculatorThree common percentage problems in one place.
- Quadratic Formula CalculatorEnter the coefficients a, b and c of a quadratic equation to get its roots, the discriminant and the vertex of the parabola.
- Standard Deviation CalculatorPaste or type a list of numbers and choose whether it is a whole population or a sample.
- Percent of a Number CalculatorEnter a percentage and a number to find the amount, plus the totals when you add or subtract that percentage.
Worked example (a fixed example using the starting numbers, it does not change as you type)
Inputs: Number 1 = 48; Number 2 = 180.
- Greatest common factor (GCF) 12
- Least common multiple (LCM) 720
Embed this calculator
Add this calculator to your own page. Paste the code where you want it. The small link keeps credit to the source.
More math calculators
- Percentage Calculator
- Percent Change Calculator
- Percent of a Number Calculator
- Standard Deviation Calculator
- Quadratic Formula Calculator
- Fraction Calculator
- Prime Factorization Calculator
- Factorial Calculator
- Exponent Calculator
- Square Root Calculator
- Percent Error Calculator
- Ratio Calculator
- Roman Numeral Converter
- Pythagorean Theorem Calculator
- Triangle Calculator
- Area Calculator
- Circle Calculator
- Volume Calculator
- Slope, Distance and Midpoint Calculator
- Logarithm Calculator
- Number Sequence Calculator
- Factor Calculator
- Rounding Calculator
- Scientific Notation Calculator
- Long Division Calculator
- Basic Calculator
- Random Number Generator
- Half-Life Calculator
- Matrix Calculator
- Big Number Calculator
- P-Value Calculator
- Density Calculator
- Molarity Calculator
- Molecular Weight Calculator