How to use the LCM & GCF Calculator
- Enter two or more whole numbers.
- Read the GCF and LCM.
- Check the prime factorization of each number in the working.
What does this tool do?
The greatest common factor (also called GCD or HCF) is the biggest number that divides all of your numbers exactly. The least common multiple is the smallest number they all divide into.
You use the GCF to simplify fractions and the LCM to find a common denominator when adding fractions.
Why use it?
- Works with any number of values, not just two.
- Shows prime factorizations.
- Uses exact integer arithmetic.
Example: 12, 18 and 30
12 = 2² × 3, 18 = 2 × 3², 30 = 2 × 3 × 5. The GCF takes the lowest shared powers: 2 × 3 = 6. The LCM takes the highest powers of every prime: 2² × 3² × 5 = 180.
The formula
Privacy
The calculation happens instantly in your browser. The numbers you enter are not sent to our servers or saved. There's no account to create and nothing to install.
Last reviewed by the M2Toolkit team.