GCF & LCM Calculator
Use this GCF and LCM calculator to find the greatest common factor and least common multiple of two numbers instantly.
Enter two positive whole numbers. GCF is the largest number that divides both; LCM is the smallest number both divide into.
GCF (greatest common factor)
6
Largest number that divides both
LCM (least common multiple)
36
Smallest number both divide into
Factors of GCF (6)
Last updated: February 2026
How this calculator is verified
Checked by True Calculator automated test suite on
- Formula verified against a published worked example in the automated test suite
- Edge cases (zero, negative, boundary and unit-mismatch inputs) covered by unit tests
The full verification method is on our how we verify page. Found an error? Tell us and we will re-check it.
When to Use This Calculator
A tiler in Indore uses tiles 12 centimetres across and slabs 18 centimetres long, and wants the largest size that divides both so no tile needs cutting. Entering 12 and 18, the calculator returns a GCF of 6, the largest number that divides both evenly. The LCM is 36, the smallest number both divide into, since 36 is 3 twelves and 2 eighteen-sets. A built-in check holds: the product of the two numbers, 216, equals the GCF times the LCM, 6 times 36.
How to Use This Calculator
- Step 1: Enter the first number in the first field.
- Step 2: Enter the second number in the next field.
- Step 3: Calculate to run both the GCF and the LCM computation together.
- Step 4: Read the greatest common factor and the least common multiple, and check the factor list if it is shown.
Worked Example
A tiler in Indore uses tiles 12 centimetres across and slabs 18 centimetres long, and wants the largest size that divides both so no tile needs cutting. Entering 12 and 18, the calculator returns a GCF of 6, the largest number that divides both evenly. The LCM is 36, the smallest number both divide into, since 36 is 3 twelves and 2 eighteen-sets. A built-in check holds: the product of the two numbers, 216, equals the GCF times the LCM, 6 times 36.
Tips and Common Mistakes
- •Tip 1: The GCF times the LCM of two numbers always equals their product, so use that to verify either answer.
- •Tip 2: For more than two numbers, combine them two at a time, carrying the GCF or LCM forward.
- •Tip 3: Use the LCM for scheduling repeating events, such as two machines that need servicing on a common cycle.
- ✗Mistake 1: Confusing the two results; the GCF cannot exceed the smaller number, while the LCM is never smaller than the larger one.
- ✗Mistake 2: Multiplying the numbers and calling it the LCM; only dividing by the GCF gives the correct value.
Frequently Asked Questions
What is the difference between the GCF and the LCM?
The GCF (greatest common factor) is the largest number that divides both inputs exactly, while the LCM (least common multiple) is the smallest number both divide into. For 12 and 18 the GCF is 6 and the LCM is 36.
How do I find the LCM without listing multiples?
Use the relationship LCM = (a × b) ÷ GCF. For 12 and 18 that is 216 ÷ 6 = 36. The calculator applies this method internally and shows the prime factorisation so you can follow the working.
Why is the GCF also called the HCF in India?
GCF stands for greatest common factor and HCF for highest common factor — they are the same value under two names. Indian textbooks and exams mostly use the term HCF, while international material prefers GCF.
Where are HCF and LCM used in exams?
HCF and LCM questions appear from Class 5 onwards and are regular features of competitive exams such as CAT, SSC and bank tests. Typical problems involve buses meeting on schedule, splitting items into equal groups, or finding the smallest number divisible by several values.
How can I verify both results quickly?
The GCF multiplied by the LCM always equals the product of the two input numbers. For 12 and 18, 6 × 36 = 216 = 12 × 18, so one multiplication check confirms both answers.
Compare these tools
- Percentage Calculator — Calculate percentages, percentage difference and percentage change instantly
- Rounding Calculator — Round any number to the nearest value, or up and down, to any decimal places
- Standard Form Calculator — Convert numbers to and from standard form (scientific notation) with one click
You might also need
Related calculators from other categories
Health & Fitness
BMI Calculator
Calculate your Body Mass Index instantly and see your WHO weight category — underweight, normal, overweight or obese. Free for men and women.
Health & Fitness
BMR Calculator
Calculate your basal metabolic rate with Mifflin-St Jeor or Katch-McArdle equations. Know how many calories you burn at rest.
Science & Weather
Kinetic Energy Calculator
Calculate kinetic energy from mass and velocity in joules, kilojoules and calories. See how speed changes the energy.
Finance
Present Value Calculator
Discount a future amount back to today's rupees with any compounding frequency. Plan goals and inflation.