Skip to main content
True Calculator

Greatest Common Divisor Calculator

Find the GCD of two or more whole numbers for fractions, ratios and grouping.

Comma-separated whole numbers, e.g. 12, 18, 24.

Greatest common divisor

6

of 2 numbers

Divides all inputs

Yes

Every input is a multiple of the GCD

The GCD is the largest whole number that divides every input exactly. For 12 and 18 the GCD is 6. The GCD of 0 and any number is that number.

Greatest Common Divisor Calculator on True Calculator gives you an instant, accurate answer with no sign-up and no app install. Find the GCD of two or more whole numbers for fractions, ratios and grouping. Every result shows the formula and a worked example so you can verify the calculation yourself, and all values are computed in your own browser — your numbers never leave your device.

Popular uses: greatest common divisor calculator · gcd calculator · highest common factor

Reviewed by the True Calculator team · Last updated: August 2026

How We Calculate

This calculator uses standard mathematical formulas — the same ones taught in school and used in exams — verified by our team. All calculations are performed instantly in your browser using JavaScript, so no data is sent to any server.

The formulas follow standard mathematical definitions and conventions used in textbooks and by educational boards. Results are rounded transparently and shown with the exact formula on this page.

When to Use This Calculator

Use the greatest common divisor calculator whenever something must be split into equal parts with no remainder — distributing sweets among guests, cutting cloth or cables into equal pieces, packing items into identical boxes, or simplifying ratios and fractions. Indian shopkeepers, caterers and event planners use it daily for fair division problems, and students solving HCF questions from board exams verify their answers in seconds. Engineers use the GCD to schedule repeating cycles, since two periodic tasks align at their common divisor, and musicians apply the same arithmetic to rhythm cycles. The calculator accepts two or more numbers at once and reports the largest exact divisor, matching the definition used in textbooks, so both school problems and real-world grouping tasks resolve in one step.

How to Use This Calculator

  1. Step 1: Enter two or more whole numbers, comma-separated, such as 24, 36.
  2. Step 2: Negative numbers are accepted — the GCD is always reported positive.
  3. Step 3: Read the GCD, the largest number that divides every value exactly.
  4. Step 4: Use it to split groups, cut materials or reduce ratios.

Worked Example

A caterer in Bengaluru has 24 sweets and 36 savouries and wants identical gift plates with no leftovers. Entering 24, 36 returns a GCD of 12 — the largest group size dividing both, so each of 12 plates holds 2 sweets and 3 savouries. Fabric rolls of 12, 18 and 24 metres cut equally into 6-metre pieces. Cables of 16, 24 and 40 metres make 8-metre sections, and grain bags of 100, 150 and 250 kg take 50 kg per bag for equal distribution.

Tips and Common Mistakes

  • Tip 1: The GCD of a list is the largest number that divides every entry exactly — perfect for equal grouping.
  • Tip 2: For two numbers the GCD also reduces fractions: 48/60 divided by 12 becomes 4/5.
  • Tip 3: If the GCD is 1, the numbers share no common factor — the ratio is already in lowest terms.
  • Mistake 1: Confusing GCD with LCM — the GCD is the largest common divisor, the LCM is the smallest common multiple.
  • Mistake 2: Entering decimals or fractions; the GCD is defined for whole numbers only, and the calculator returns a hint.

Frequently Asked Questions

What is the greatest common divisor?

The GCD (also called HCF) is the largest whole number that divides every input without a remainder. The GCD of 12 and 18 is 6, since 6 is the largest number that divides both.

Why is GCD or HCF so common in Indian school maths?

The HCF is taught from Class 5 in the CBSE and state boards and is used to simplify fractions, divide things into equal groups, and solve word problems like sharing 56 sweets and 98 biscuits equally — the largest equal share is their GCD, 14.

Can I find the GCD of more than two numbers?

Yes. Enter as many whole numbers as you like separated by commas. The GCD is computed pair by pair: the GCD of 24, 36 and 60 is 12 because 12 divides all three.

How is GCD related to LCM?

For two numbers, GCD × LCM equals their product. For 12 and 18, GCD 6 × LCM 36 = 216 = 12 × 18. This relationship is a favourite question in competitive exams like CAT and bank tests.

What does the calculator do with zero?

Zero is treated as the identity element — the GCD of 0 and 5 is 5, because every number divides 0. The GCD of 0 and 0 is defined as 0. Decimals are rejected because the GCD only applies to whole numbers.

You might also need

Related calculators from other categories