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.
| 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) |
60 = 48 × 1 + 12
48 = 12 × 4 + 0
Last non-zero remainder = 12
48 = 2 × 2 × 2 × 2 × 3 = 2⁴ × 3
60 = 2 × 2 × 3 × 5 = 2² × 3 × 5
Shared Primes: 2² × 3¹ = 4 × 3 = 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 12 | 12 | 48 | 4 : 1 | No | 1, 2, 3, 4, 6, 12 |
| 48 vs 18 | 6 | 144 | 8 : 3 | No | 1, 2, 3, 6 |
| 48 vs 24 | 24 | 48 | 2 : 1 | No | 1, 2, 3, 4, 6, 8, 12, 24 |
| 48 vs 36 | 12 | 144 | 4 : 3 | No | 1, 2, 3, 4, 6, 12 |
| 48 vs 60 (Active) | 12 | 240 | 4 : 5 | No | 1, 2, 3, 4, 6, 12 |
| 48 vs 64 | 16 | 192 | 3 : 4 | No | 1, 2, 4, 8, 16 |
| 48 vs 72 | 24 | 144 | 2 : 3 | No | 1, 2, 3, 4, 6, 8, 12, 24 |
| 48 vs 100 | 4 | 1200 | 12 : 25 | No | 1, 2, 4 |
| 48 vs 120 | 24 | 240 | 2 : 5 | No | 1, 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)untilr = 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
- Select Mode: Choose between two numbers, three numbers, or an arbitrary list of integers.
- Adjust Inputs: Enter integers directly into the numeric fields or slide the synchronized dual range sliders. Values update dynamically in real time.
- Review Step-by-Step Proofs: Inspect the Euclidean division table, prime factor breakdowns, shared factors list, and the simplified fraction ratio.
- 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) |
|---|---|---|
| 2 | Last digit is even (0, 2, 4, 6, 8) | Ends in 8 → Divisible |
| 3 | Sum of all digits is divisible by 3 | 4 + 8 = 12 (divisible by 3) → Divisible |
| 4 | Last two digits form a number divisible by 4 | 48 is divisible by 4 → Divisible |
| 5 | Last digit is 0 or 5 | Ends in 8 → Not divisible |
| 6 | Divisible by both 2 and 3 | Passes 2 and 3 → Divisible |
| 8 | Last three digits are divisible by 8 | 48 ÷ 8 = 6 → Divisible |
| 9 | Sum of digits is divisible by 9 | 4 + 8 = 12 (not divisible by 9) → Not divisible |
| 10 | Last digit is 0 | Ends 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.