Skip to main content

Greatest Common Factor (GCF) Calculator

Find the greatest common factor (GCF / GCD / HCF) and least common multiple (LCM) of numbers with step-by-step Euclidean algorithm divisions, prime factor Venn diagrams, and divisor listings.

? Enter any non-negative integer (e.g. 48).
? Enter any non-negative integer (e.g. 60).
Greatest Common Factor
GCF = 12
Numbers: 48, 60 | Least Common Multiple (LCM): 240
Mathematical Summary
Input Numbers 48, 60
Greatest Common Factor (GCF) 12
Least Common Multiple (LCM) 240
All Common Factors 1, 2, 3, 4, 6, 12
Simplified Ratio (A : B) 4 : 5 (48/60 = 4/5)
Coprime Status No (Share factor 12)
1. Euclidean Division Steps: 60 = 48 × 1 + 12 48 = 12 × 4 + 0 Last non-zero remainder = 12
2. Prime Factorization Method: 48 = 2 × 2 × 2 × 2 × 3 = 2⁴ × 3 60 = 2 × 2 × 3 × 5 = 2² × 3 × 5 Shared Primes: 2² × 3¹ = 4 × 3 = 12
Application Insight: The GCF of 12 means you can simplify 48/60 down to 4/5 by dividing both numerator and denominator by 12. Similarly, items in batches of 48 and 60 can be divided into a maximum of 12 identical groups (each with 4 of item A and 5 of item B).
* Exact discrete integer arithmetic based on Euclidean division and the Fundamental Theorem of Arithmetic.
Prime Factor Venn Diagram (Intersection = GCF)
Number 48 Number 60 2 2 2 2 3 5 Shared: 2 × 2 × 3 = GCF 12

Common Integer Factor Benchmarks

Compare how your primary number 48 shares common factors with standard math and measurement benchmarks.

Comparison (A vs B) GCF LCM Simplified Ratio Coprime? Common Factors
48 vs 1212484 : 1No1, 2, 3, 4, 6, 12
48 vs 1861448 : 3No1, 2, 3, 6
48 vs 2424482 : 1No1, 2, 3, 4, 6, 8, 12, 24
48 vs 36121444 : 3No1, 2, 3, 4, 6, 12
48 vs 60 (Active)122404 : 5No1, 2, 3, 4, 6, 12
48 vs 64161923 : 4No1, 2, 4, 8, 16
48 vs 72241442 : 3No1, 2, 3, 4, 6, 8, 12, 24
48 vs 1004120012 : 25No1, 2, 4
48 vs 120242402 : 5No1, 2, 3, 4, 6, 8, 12, 24

About This Calculator

The Greatest Common Factor (GCF) Calculator computes the largest positive integer that divides two or more integers without leaving a remainder. In mathematics and computer science, the GCF is also called the Greatest Common Divisor (GCD) or Highest Common Factor (HCF). It forms the mathematical foundation for simplifying fractions to lowest terms, solving linear Diophantine equations, modular arithmetic, cryptography (RSA key generation), and optimal batch packaging in logistics.

Mathematical Algorithms & Practical Worked Examples

Three principal methods exist for computing the GCF:

  • 1. The Euclidean Algorithm: Repeatedly compute remainders using division: a = b × q + r. Replace (a, b) with (b, r) until r = 0. The last non-zero divisor is the GCF.
  • 2. Prime Factorization: Express each integer as a product of prime powers: n = p₁^a × p₂^b .... The GCF equals the product of each common prime raised to its minimum exponent: GCF = ∏ p_i^(min(a_i, b_i)).
  • 3. LCM Relationship: For any two positive integers A and B: LCM(A, B) = (|A × B|) ÷ GCF(A, B).

Real-World Practical Worked Examples:

Example 1 (Simplifying Fractions): Reduce 48/60 to lowest terms.
GCF(48, 60) = 12
Numerator: 48 ÷ 12 = 4
Denominator: 60 ÷ 12 = 5
Simplified Fraction = 4/5.

Example 2 (Packaging & Distribution): A bakery has 72 chocolate chip cookies and 48 blueberry muffins. They want to create identical gift boxes with no leftover items.
GCF(72, 48) = 24
Maximum identical boxes = 24 boxes (each containing 3 cookies and 2 muffins).

Example 3 (Tile Installation): A room measures 240 inches long by 180 inches wide. Find the largest square tile size that covers the floor with zero cutting.
GCF(240, 180) = 60
Largest tile dimensions = 60 in × 60 in (requiring 4 × 3 = 12 total tiles).

How to Use This Calculator

  1. Select Mode: Choose between two numbers, three numbers, or an arbitrary list of integers.
  2. Adjust Inputs: Enter integers directly into the numeric fields or slide the synchronized dual range sliders. Values update dynamically in real time.
  3. Review Step-by-Step Proofs: Inspect the Euclidean division table, prime factor breakdowns, shared factors list, and the simplified fraction ratio.
  4. Explore Visuals & Benchmarks: View the Venn diagram showing common vs unique prime factors, or export the benchmark comparison table to CSV.

Quick Reference: Core Divisibility Rules

Use these mental math divisibility shortcuts to quickly identify shared factors:

Divisor Rule Condition Test Example (Number 48)
2Last digit is even (0, 2, 4, 6, 8)Ends in 8 → Divisible
3Sum of all digits is divisible by 34 + 8 = 12 (divisible by 3) → Divisible
4Last two digits form a number divisible by 448 is divisible by 4 → Divisible
5Last digit is 0 or 5Ends in 8 → Not divisible
6Divisible by both 2 and 3Passes 2 and 3 → Divisible
8Last three digits are divisible by 848 ÷ 8 = 6 → Divisible
9Sum of digits is divisible by 94 + 8 = 12 (not divisible by 9) → Not divisible
10Last digit is 0Ends in 8 → Not divisible

Important Mathematical Terms

Factor (Divisor): An integer that divides another integer completely with zero remainder.

Common Factor: A number that is a factor of two or more given numbers.

Greatest Common Factor (GCF / GCD / HCF): The largest integer that divides all numbers in the set.

Least Common Multiple (LCM): The smallest positive integer that is divisible by all numbers in the set.

Relatively Prime (Coprime): Two or more numbers whose only common positive factor is 1 (i.e. GCF = 1, such as 9 and 14).

Fundamental Theorem of Arithmetic: Every integer greater than 1 can be uniquely factored into prime numbers.

Frequently Asked Questions

What is the difference between GCF, GCD, and HCF?
They are completely identical mathematical concepts. Greatest Common Factor (GCF) is common in North American curricula, Greatest Common Divisor (GCD) is the standard term in higher mathematics and computer science, and Highest Common Factor (HCF) is widely used in British and Commonwealth education.
What is the GCF of a number and 0?
The GCF of any non-zero number A and 0 is |A|. This is because every integer divides 0 (0 ÷ A = 0 with remainder 0), so the largest factor dividing both A and 0 is A itself. For example, GCF(48, 0) = 48. GCF(0, 0) is mathematically undefined or defined as 0.
Can the GCF ever be larger than the smallest number in the set?
No. A factor of a positive integer N cannot exceed N. Therefore, GCF(A, B) ≤ min(A, B). For example, GCF(24, 48) = 24.
How does the GCF relate to the LCM?
For any two positive numbers A and B, their product equals the product of their GCF and LCM: A × B = GCF(A, B) × LCM(A, B). This allows instant derivation of LCM once GCF is computed: LCM = (A × B) / GCF.
✓ Copied to Clipboard!