Skip to main content
True Calculator

GCF Calculator

Find the greatest common factor of two numbers, also called the highest common factor (HCF).

Greatest common factor

12

GCF of 24 and 36

Shared factors

1 and 12

Largest number dividing both

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

The greatest common factor, or HCF as it is known in Indian schools, solves a wide range of sharing and simplification problems. Students use it constantly to simplify fractions, reduce ratios and solve word problems about equal distribution in board examinations. Teachers use it to explain how 24 and 36 share the factor 12, the largest division that fits both. Builders and contractors use the GCF when sizing square tiles, bricks or panels that must divide a floor or wall both ways without cutting. Event organisers use it to form the largest identical groups from two different-sized crowds, and manufacturers apply it when packing products in quantities that suit multiple batch sizes. The calculator returns the GCF instantly using Euclid's algorithm, handles zero correctly and supports lists of numbers, making it dependable for classroom practice and real-world planning.

How to Use This Calculator

  1. Step 1: Enter the first number, such as 24.
  2. Step 2: Enter the second number, such as 36.
  3. Step 3: Read the greatest common factor, also called the highest common factor or HCF in India.
  4. Step 4: Use the GCF to simplify fractions, share items equally or plan grid layouts.

Worked Example

A contractor in Patna is tiling a rectangular courtyard that measures 24 m by 36 m. He wants the largest square tiles possible, so the tile side must divide both dimensions exactly. He enters 24 and 36 into the calculator, which returns a GCF of 12. He orders 12 m by 12 m tiles, and exactly 2 tiles fit along the 24 m side and 3 along the 36 m side, so 6 tiles cover the courtyard with no cutting. A student uses the same result to simplify the fraction 24/36 to 2/3. Another example, 7 and 13, has a GCF of 1, telling the teacher the numbers are coprime.

Tips and Common Mistakes

  • •Tip 1: Use the GCF to simplify any fraction: divide both numerator and denominator by it, as 24/36 becomes 2/3.
  • •Tip 2: For square tiles, boxes or grids, the largest equal division of two measurements is exactly the GCF.
  • •Tip 3: The GCF of a number and zero is the number itself, since zero is divisible by everything.
  • ✗Mistake 1: Mixing up GCF with LCM: the GCF is the largest shared factor, while the LCM is the smallest shared multiple.
  • ✗Mistake 2: Assuming numbers with a GCF of 1 are errors, when 1 simply means the numbers are coprime with no shared prime factor.

Frequently Asked Questions

What is the GCF?

The greatest common factor is the largest whole number that divides both inputs exactly. For 24 and 36, the GCF is 12. In India it is often called the HCF.

How is the GCF found?

The calculator uses Euclid's algorithm: repeatedly divide the larger number by the smaller and take the remainder until it reaches zero. The last non-zero remainder is the GCF.

When would I use the GCF?

You use it to simplify fractions, split items into the largest equal groups, plan tiling or grid layouts, and solve ratio problems in school and daily life.

What is the GCF of coprime numbers?

Coprime numbers, like 7 and 13, share no factors except 1, so their GCF is always 1.

How is the GCF different from the LCM?

The GCF is the largest shared factor of the numbers, while the LCM is the smallest shared multiple. Both are connected by the formula LCM × GCF = a × b.

You might also need

Related calculators from other categories