Greatest Common Divisor Calculator

Find Greatest Common Divisor and Least Common Multiple.

Save

Inputs

Your values stay on this device.

Results

GCD
LCM36

Report

Export and share

Document

Copy and share

Assumptions

  • This calculator is intended for whole-number inputs.
  • Negative signs do not change the GCD or LCM magnitude because the formulas use absolute values.
  • Non-integer or blank inputs return an invalid result instead of being rounded silently.

Sensitivity preview

Number A Current: GCD 6

Number B Current: GCD 6

Related Tools

View All

About this GCD & LCM

GCD (Greatest Common Divisor) and LCM (Least Common Multiple) are fundamental concepts in arithmetic, especially for working with fractions.

Who this calculator is for

  • Students simplifying fractions or checking divisibility homework.
  • Teachers and tutors explaining factors, multiples, and common denominators.
  • Anyone comparing two whole numbers to find shared factors or shared multiples.

When to use it

  • Use it before adding or subtracting fractions to find a lowest common denominator.
  • Use it when reducing ratios or checking whether two integers are coprime.
  • Use it as a quick divisibility helper before prime factorization or long division.

How to use this calculator

  1. Enter Number A.
  2. Enter Number B.

Key assumptions

  • This calculator is intended for whole-number inputs.
  • Negative signs do not change the GCD or LCM magnitude because the formulas use absolute values.
  • Non-integer or blank inputs return an invalid result instead of being rounded silently.

Accuracy and testing

Review formula sources, default test cases, assumptions, unit handling, rounding rules, and changelog for this calculator.

View accuracy page

How this calculator works

GCD: Found using the Euclidean algorithm. LCM: Calculated as (|A × B|) / GCD(A, B).

Understanding your results

GCD is the largest number that divides both inputs evenly. LCM is the smallest number that both inputs divide into.

Example scenarios

12 and 18

GCD is 6. LCM is 36.

5 and 7

GCD is 1 (they are coprime). LCM is 35.

Key Features

  • Instant Calculation
  • Private & Secure
  • Mobile Optimized

Glossary of Terms

Coprime
Two numbers whose GCD is 1.
Factor
A number that divides another number evenly.

Frequently Asked Questions

Is GCD the same as GCF?
Yes. Greatest Common Divisor (GCD) and Greatest Common Factor (GCF) are the same thing.
What is LCM used for?
It is most commonly used to find the 'Lowest Common Denominator' when adding fractions.
Can GCD be 1?
Yes, if the two numbers share no common factors (like 7 and 9), the GCD is 1.